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: Impossible SQL query?

Re: Impossible SQL query?

From: Scott <Scott.Mattes_at_gmail.com>
Date: 4 Oct 2005 08:52:31 -0700
Message-ID: <1128441151.370330.246150@g49g2000cwa.googlegroups.com>


Have you looked into something along the lines of (sorry, Tom Kyte I am not)

select a.*, b.*
from ( select date, row_num() over (partition by key order by id ) rn from table where key = 'B' ) a,
( select date, row_num() over (partition by key order by id ) rn from table where key = 'E' ) b
where a.rn = b.rn
-- and a.if is not null Received on Tue Oct 04 2005 - 10:52:31 CDT

Original text of this message

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