I need to write select statement where in it will iterate through a specific logic while selecting records itself.
Start_Date End_Date
2011-01-01 2011-04-01
If I have above record then I need to write to output based on number of months difference between 2 dates. (On every iteration need to increment start_date by one month so that difference will be only months)
Final Output:
Start_Date End_Date Date_Col
2011-01-01 2011-04-01 2011-01-01
2011-01-01 2011-04-01 2011-02-01
2011-01-01 2011-04-01 2011-03-01
2011-01-01 2011-04-01 2011-04-01