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

Home -> Community -> Usenet -> c.d.o.server -> oracle SQL question..

oracle SQL question..

From: Bhavesh Gosar <gosar_at_EBB.Eng.Sun.COM>
Date: 1998/05/27
Message-ID: <6ki3m2$7sd$2@engnews2.Eng.Sun.COM>#1/1

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

Original text of this message

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