Venkat's SQL Server Club
"Simple Approach to Address and Solve Complex Issues"
Showing posts with label
One Way to generate dates from CTE
.
Show all posts
Showing posts with label
One Way to generate dates from CTE
.
Show all posts
Friday, August 12, 2011
One Way to generate dates from CTE
WITH
cteDate AS(
SELECT 0 AS N UNION ALL SELECT N + 1 FROM
cteDate
WHERE N < 11)
SELECT
StartOfMonth = DATEADD(mm,N,'2010')
FROM
cteDate;
Older Posts
Home
Subscribe to:
Posts (Atom)