Viewing 5 posts - 1 through 5 (of 5 total)
Nice article.
I see Itzik using this approach a lot as well. Personally I like it but is stuck due to a third party program in an lower compatibility level quite...
August 2, 2012 at 3:23 am
Koen Verbeeck (3/13/2012)
And what if February doesn't have any data?
Unless I am mistaken he had year and month separated so it wouldn't work checking for it until they are combined...
March 13, 2012 at 3:32 am
An option:
SELECT DATENAME(month, DATEADD(month, [number], 0)) [MonthName]
, MONTH(DATEADD(month, [number], 0)) [MonthValue]
FROM [master].[dbo].[spt_values]
WHERE [type]='P'
AND [number] BETWEEN 0 AND 11
ORDER...
March 13, 2012 at 3:28 am
bkubicek (11/21/2011)
November 22, 2011 at 1:01 am
I do realize this was not the purpose of the article but it made me think of it so here's a recursive version. It'll stop after 100 recursions unless the...
October 3, 2011 at 1:31 am
Viewing 5 posts - 1 through 5 (of 5 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy