Query for values from one column based on values in another column
694834Apr 6 2009 — edited Apr 8 2009Hi Guys,
I have two tables.
Table 1:
User_Id Cpnt_Id
1000 A00
1000 B00
2000 A00
3000 A00
3000 B00
4000 B00
5000 B00
Table 2:
Cpnt_Id
A00
B00
Now I want fetch all the User_Ids that have both A00 abd B00. i.e. in this example I nead 1000 and 3000 as my query result. There is no limit to number of Cpnt_Ids or users.
What is the best method to get the result?
Any help will be appreciated.
Thanks in advance
Regards,
Vinay
Edited by: user10981565 on Apr 6, 2009 9:02 AM