Below is my code that will return all the months in a year.
SELECT TOP 12
DATENAME(MONTH, DATEADD(MONTH,ROW_NUMBER() OVER (ORDER BY object_id) - 1,0))
FROM sys.columns
What change must I make to only return the months that have passed and the current month?
Try this instead.