sakthikumar
asked on
Query to split one row to multiple rows.
I have records like below.
col1 col2
11-Sep-14 11-Oct-14
15-Sep-14 18-Sep-14
In the first row I am having col1 & col2 in different months, so first record should be split like below
col1 col2
11-sep-14 30-sep-2014
1-oct-14 11-oct-2014
In the second row, I just have values from same month,
so it should as it is. so altogether it should be 3 rows.
col1 col2
11-Sep-14 11-Oct-14
15-Sep-14 18-Sep-14
In the first row I am having col1 & col2 in different months, so first record should be split like below
col1 col2
11-sep-14 30-sep-2014
1-oct-14 11-oct-2014
In the second row, I just have values from same month,
so it should as it is. so altogether it should be 3 rows.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This query works exactly for me, just like to know if I achieve this through outer joins...
just like to have your expert opinion on this.