query help
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