Home Forums SQL Server 7,2000 T-SQL Merging two select statements for MTD and YTD RE: Merging two select statements for MTD and YTD
Sergiy
SSC Guru
Points: 110207
More actions
March 14, 2013 at 5:26 pm
#1597299
I guess a query WITH ROLLUP would allow avoiding double-run.
Then a row with grouping on YEAR column would contain aggregated values from all rows with grouping on month.
_____________Code for TallyGenerator