Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> oracle SQL question..
Hi,
I have table ....
KC MKT PLT QTY
---------- ---------- --- ----------
100 M1 P1 1 100 M1 P1 2 100 M1 P1 3 200 M2 P1 1 300 M3 P3 1 200 M2 P2 1 100 M1 P2 1
I want to select everything which is in PLT='P1' and only those records from other PLT's which have different combination of "KC, MKT and QTY fields"....
The output should look as follows...
KC MKT PLT QTY
---------- ---------- --- ----------
100 M1 P1 1 100 M1 P1 2 100 M1 P1 3 200 M2 P1 1 300 M3 P3 1
Is there any one-sql statement which can do this...??
TIA,
Bg
Received on Wed May 27 1998 - 00:00:00 CDT