Click here to Skip to main content
12,829,103 members (40,065 online)
Click here to Skip to main content
Articles » Database » Database » General » Revisions


8 bookmarked
Posted 18 Dec 2009

Using Common Table Expressions and Recursion in SQL Server 2008

, 28 Apr 2010 CPOL
By using recursion (and CROSS JOINS), you can generate data without looping or hard-coding INSERT statements into a temporary table.In the example below, you can use recursion to generate a week of scheduling data for three employees. -- Count variable, set to 7 for a week's worth of...



Compare Revision Minor Date Status Editor
5 - publicly available Yes 28-Apr-10 3:41 Available Gordon Kushner
2 No 1-Jan-10 11:24 Composing Gordon Kushner
1 No 1-Jan-10 11:24 Composing Gordon Kushner


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Gordon Kushner
Software Developer (Senior)
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170326.1 | Last Updated 28 Apr 2010
Article Copyright 2009 by Gordon Kushner
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid