Sharing my daily SQL and BI challenges, tips and tricks.
SELECT Number + 1 as [Month Number],
DateName(mm,DATEADD(mm,Number,0)) as [Month Name]
FROM master..spt_values
WHERE Type = 'P' and Number < 12
No comments:
Post a Comment