Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Generating number sequences with Common Table Expressions

By Rafal Skotak,

Unfortunatelly the base script is able to generate sequences of limited length due to SQL Server 2005 limit for 32767 reqursion levels, so for longer sequences I had to fall back on 'cross join'.

Total article views: 1817 | Views in the last 30 days: 6
 
Tags
 
Contribute