Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help for SQL!?
JZ wrote:
> Oracle 9.2
>
> I have a table like:
>
> t1 t2 t3
> -----------------------------
> char1 01/01/2004 01/05/2004
> char1 01/10/2004 01/15/2004
> char1 01/20/2004 01/25/2004
> char1 01/01/2004 01/15/2004
> char1 01/01/2004 01/25/2004
> char1 01/10/2004 01/25/2004
>
> t2 value is always less than t3.
>
> How can I use SQL (no PL/SQL) to get output like:
>
> t1 t2 t3
> -----------------------------
> char1 01/01/2004 01/05/2004
> char1 01/10/2004 01/15/2004
> char1 01/20/2004 01/25/2004
>
> WHat I want is: no 'middle' values between t2 and t3 can be found in
> the table.
> The reason why 'char1 01/01/2004 01/15/2004' is no good is because
> '01/10/2004' is between '01/01/2004' and '01/15/2004', and it's in the
> table.
>
> Any help?
>
> THanks a lot!!!
This is school work so you need to work on this yourself.
Personally I think the request preposterous and that any sane person would use PL/SQL.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sat Jul 03 2004 - 01:05:04 CDT
![]() |
![]() |