Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create data from a range
Message
De
17/10/2014 09:17:20
 
 
À
17/10/2014 08:28:23
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2014
Application:
Web
Divers
Thread ID:
01609576
Message ID:
01609586
Vues:
31
>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
Fil
Voir

Click here to load this message in the networking platform