gvamsimba
asked on
SQL Help Needed
Table A
custid orderid
101 5418
102 7408
102 5408
103 9547
Table B
Orderid
5418
9547
5408
I have 2 tables. From table A I only need to select those custid where all the orderid's are present in
table B.
in this case, I only need to select custid 101 and 103 as one of the orderid (7408) is not present in tablel B.
can anyone please give me that SQL ? I am using IBM DB2 Database.
Many Thanks
custid orderid
101 5418
102 7408
102 5408
103 9547
Table B
Orderid
5418
9547
5408
I have 2 tables. From table A I only need to select those custid where all the orderid's are present in
table B.
in this case, I only need to select custid 101 and 103 as one of the orderid (7408) is not present in tablel B.
can anyone please give me that SQL ? I am using IBM DB2 Database.
Many Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Fantastic Ste5an. it worked like a charm .
Many Thanks
Many Thanks
ASKER