Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sql query build question
Richard Kuhler tried to tell us something, and all I got was:
> It's probably easiest to just do a union query...
>
> select *
> from tab
> where something = 'Y' and somewhat = 'Y'
> union
> select *
> from tab
> where something = 'Y' or somewhat = 'Y'
> and not exists (
> select *
> from tab
> where something = 'Y' and somewhat = 'Y'
> )
Thanks - that is exactly what I needed.
/mich
-- Regards, Michael L. Hostbaek -= Thanks for all the fish.. =-Received on Thu Nov 22 2001 - 02:30:17 CST
![]() |
![]() |