I have a simple select query that has this result:
first_date | last_date | outstanding
14/01/2015 | 14/04/2015 | 100000
I want to split it to be
first_date | last_date | period | outstanding
14/01/2015 | 31/01/2015 | 31/01/2015 | 100000
01/02/2015 | 28/02/2015 | 28/02/2015 | 100000
01/03/2015 | 31/03/2015 | 31/03/2015 | 100000
01/04/2015 | 14/04/2015 | 31/04/2015 | 100000
Please show me how to do it simply, without using function/procedure, object and cursor.