Hi,
Im working on a stored procedure to get monthly reports from a table. For that i need to develop a logic to perform the following function:
suppose i give a start_date and end_date, i need to get the months split up between these dates.
for eg) if I give start_date = 21-JAN-2009 and end_date = 15-APR-2009 i need to get the split up in the following format.
TEMP_START_DATE TEMP_END_DATE
---------------------------------
21-JAN-2009 31-JAN-2009
01-FEB-2009 28-FEB-2009
01-MAR-2009 31-MAR-2009
01-APR-2009 15-APR-2009
Finally, when this output is generated, it should be inserted into a cursor or some form of temporary data set, so that I can retrieve the values later on.
Any help regarding this would be highly appreciated.