BigKahunna
Programmer
I have the following query. There are two tables in the DB, one with supplier details and one with supplier rates:-
At the moment the select picks all the rates where there is an entry in the rates table for EITHER rate 11 or 14. What I want to do is return all the Rates with IDs 11 & 14 for all suppliers who have BOTH rate 11 and 14
Thanks in advance for any help on this one, i'm tearing my hair out trying to get a solution
Code:
SELECT SupplierID, RatesTable.* FROM SupplierTable INNER JOIN RatesTable on SupplierTable.SupplierID = RatesTable.SupplierID WHERE RatesTable.RateTypeID IN (11, 14)
At the moment the select picks all the rates where there is an entry in the rates table for EITHER rate 11 or 14. What I want to do is return all the Rates with IDs 11 & 14 for all suppliers who have BOTH rate 11 and 14
Thanks in advance for any help on this one, i'm tearing my hair out trying to get a solution