Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

query help

user626688Mar 20 2008 — edited Apr 1 2008
please see the rows

ID DEF_BILL DEF_SH

20 N N
20 N Y
20 Y N

30 N N
30 N N

40 Y Y
40 N N
40 N Y

Here I want those ID's which has DEF_SH and DEF_BILL 'N' in all the instances of that particular ID.

In the above example only ID 30 has 'N' for DEF_SH and DEF_BILL in the available two values of 30.

But 20 and 40 has 'Y' somewhere. If you see the ID 40, the second instance of 40 has N for both DEF_BILL and DEF_SH but this does not qualify because in other instances, Y is available for either DEF_SH or DEF_BILL or for both.

So I want to select all those ID's which does not have 'Y' in any of its occurances.


Please help if anybody can... Thanks in advance

Message was edited by:
user626688

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 29 2008
Added on Mar 20 2008
8 comments
5,206 views