Viewing post 1 (of 1 total)
WITH months(MonthNumber) AS
(
SELECT 0
UNION ALL
SELECT MonthNumber+1 FROM months WHERE MonthNumber < 11
)
select datename(month,dateadd(mm,m.MonthNumber,0)),t.val from testing as t...
July 30, 2015 at 10:39 pm
#1816348