oracle SQL question..

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


Hi,

[Quoted] [Quoted] [Quoted] [Quoted] I have table ....

KC MKT PLT QTY
---------- ---------- --- ----------

[Quoted] 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

[Quoted] Is there any one-sql statement which can do this...??

TIA,
Bg Received on Wed May 27 1998 - 00:00:00 CEST

Original text of this message