I have 2 tables. In table1 I have 2 columns — cust_npa & cust_nxx. In table2, I have 2 columns — valid_npa & valid_nxx. Each entry in table2.valid_npa has a corresponding entry in table2.valid_nxx.
valid_npa valid_nxx
201 551
201 552
201 553
202 851
202 852
I wish to return all the rows in table1 that have a combination of valid_nap & valid_nxx from table2.
For example, a row in table1 that has cust_npa of 201 and cust_nxx of 852 would not be returned (as this is not a valid combination from table2).
1 Answer