Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: neeed to eleminate overlaps in dates from query

Re: neeed to eleminate overlaps in dates from query

From: sim <jmenker_at_muenster.de>
Date: 14 Oct 2005 04:18:37 -0700
Message-ID: <1129288717.198787.243100@g44g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US