I have a database which is in Access (you can get it link text). If I run
SELECT DISTINCT Spl.Spl_No, Spl.Spl_Name
FROM Spl INNER JOIN Del
ON Spl.Spl_No = Del.Spl_No
WHERE Del.Item_Name <> 'Compass'
It provides the names of the suppliers that have never delivered a compass. However you can supposedly do this with a sub-query. So far myself and a few others have not been able to get it right.
I did come close with the following, until we added more suppliers then it stopped working
SELECT SPL.SPL_Name
FROM SPL
LEFT JOIN DEL ON Del.SPL_No = SPL.SPL_No
WHERE (DEL.Item_Name<>"Compass") OR (DEL.Item_Name IS NULL)
GROUP BY SPL.SPL_Name
HAVING COUNT(DEL.SPL_No) = 0
So the question: Is this possible to do with a sub-query.