Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: neeed to eleminate overlaps in dates from query
To solve this problem with SQL only is possible but requires a lot of
effort. The better way is a stored procvedure. If you want to solve the
problem with SQL try the following:
Duplicate the above query and add a rownum to it. Then join the two queries by their key and by rownum1-ronum2=1 (order is of course important!) . This way you get the predecessor and the successor. In a third query you can then select effective_start_date -1 as the end_date.
sim Received on Fri Oct 14 2005 - 06:18:37 CDT
![]() |
![]() |