Information générale
Forum:
Microsoft SQL Server
Versions des environnements
SQL Server:
SQL Server 2014
>I started to type a reply and then saw you used a common table expression with recursion. It's a great approach. I use that when I need to create a date range (e.g. all the Saturdays between two dates)
>
>
>Just a note (and if this was in your code, I missed it) - if you have more than 100 iterations, you'll need to specify MAXRECURSION
>
>Basically at the end of the final SELECT from the common table expression, you'll need....
>
>OPTION (MAXRECURSION 10000)
>
>Or whatever value is safe as a max. Note that it can't go higher than 32,767
>
>
>But always glad to see someone using that feature.
Thanks Kevin
I'll add that in.
Yes I'm pleased with it . its so simple
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement