Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WITH DataSeries AS
- (
- SELECT CAST('01-01-2022' AS DATE) AS MyDate
- UNION ALL
- SELECT
- DATEADD(DAY,1,MyDate)
- FROM DataSeries
- WHERE MyDate < CAST('12-31 - 2022' AS DATE)
- )
- SELECT
- MyDate
- FROM DataSeries
- OPTION(MAXRECURSION 365)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement