I am trying to create a dataset to populate a parameter for a report. I basically need it to display a list of Month + Year for the past 12 month and have it roll.
I can make it pull the current month using....
SELECT DATENAME(month, GETDATE()) + ' ' + DATENAME(year, GETDATE()) AS Month
This returns April 2009
But I need something to return
etc.. back to April 2008