I have 3 tables
tblGarages
---------------------
GarageID | CompanyName
tblGarageMechanics
----------------------
GarageID | CertMechID
tblCertifiedMechanics
--------------------------
CertMechID | Mechanic Name
A garage can have mechanics who are certified
and not. I want to display all Garages that HAVE NO certified mechanics.
SELECT DISTINCT(a.GarageID), CompanyName
FROM tblGarages a, tblGarageMechanics b, tblCertifiedMechanics c
WHERE a.GarageID = b.GarageID
AND b.CertMechID <> c.CertMechID
ORDER BY CompanyName
This obviously doesn't work as it will display a garage name if some of the garage mechanics are uncertified.
Any ideas?
Thanks for replies
tblGarages
---------------------
GarageID | CompanyName
tblGarageMechanics
----------------------
GarageID | CertMechID
tblCertifiedMechanics
--------------------------
CertMechID | Mechanic Name
A garage can have mechanics who are certified
and not. I want to display all Garages that HAVE NO certified mechanics.
SELECT DISTINCT(a.GarageID), CompanyName
FROM tblGarages a, tblGarageMechanics b, tblCertifiedMechanics c
WHERE a.GarageID = b.GarageID
AND b.CertMechID <> c.CertMechID
ORDER BY CompanyName
This obviously doesn't work as it will display a garage name if some of the garage mechanics are uncertified.
Any ideas?
Thanks for replies