Possible Duplicate:
Months between two dates
I have date range as [start date] = '2012-09-01' and [finish date] = '2014-01-01'
Now, I need to display months between two dates..using a single select statement
Expected Output :
9
10
11
12
1
2
3
.
.
.
12
1
How can I do this?
You can user table variables also: