Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Continuous month removal query

user629814Mar 1 2009 — edited Mar 3 2009
Hi,

Help to to form a query which displas the below result.
The continuous month in to_date & from_date must be removed. The is a gap between 29-Feb-2008 and 01-Apr-2008. so this is displayed as seperate row in the expected result.

Dataset

MBR_SID FROM_DATE TO_DATE
00999 Jan-01-2008 Jan-31-2008
00999 Feb-01-2008 Feb-29-2008
00999 Apr-01-2008 Apr-30-2008
00999 May-01-2008 May-31-2008
00999 Jun-01-2008 Jun-30-2008
00888 Feb-01-2008 Feb-29-2008



EXPECTED RESULT

MBR_SID FROM_DATE TO_DATE
00999 Jan-01-2008 Feb-29-2008
00999 Apr-01-2008 Jun-30-2008
00888 Feb-01-2008 Feb-29-2008


Thanks in Advance
S. Sathish Kumar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2009
Added on Mar 1 2009
3 comments
2,157 views