Basically I have one row of data, for example:
ID - Start_Date - End_Date
------------------------------------
XXA 1/23/14 3/12/14
And I want to create one row for each month between the Start_Date
and End_Date
, for each ID
, for example:
ID - Month - Year
--------------------------
XXA January 2014
XXA February 2014
XXA March 2014
Which is the best and most efficient way of doing this? I was thinking of using a cursor, but once this table is created, I need to join other ones to this one. I am new to oracle, and I am not sure if you can join other tables after you run a cursor and create a temporary table. Any help would be greatly appreciated.
See Question&Answers more detail:os