(I posted this as a reply, but should've started a new thread)
I have been trying to use the WHERE NOT EXISTS statement in a query, and I keep getting the error message that I'm missing an operator... I've read the article on subqueries, but am still not sure where I'm going wrong.
Here's my code:
SELECT S.name
FROM store as S
WHERE NOT EXISTS ((SELECT P.productID
FROM product as P)
EXCEPT
(SELECT R.productID
FROM store as S INNER JOIN (rentals as R LEFT JOIN product as P ON R.productID=M.productID) ON (R.storeID=S.storeID)
WHERE (P.supplier="Germany")))
What syntax am I missing?
Thanks.
I have been trying to use the WHERE NOT EXISTS statement in a query, and I keep getting the error message that I'm missing an operator... I've read the article on subqueries, but am still not sure where I'm going wrong.
Here's my code:
SELECT S.name
FROM store as S
WHERE NOT EXISTS ((SELECT P.productID
FROM product as P)
EXCEPT
(SELECT R.productID
FROM store as S INNER JOIN (rentals as R LEFT JOIN product as P ON R.productID=M.productID) ON (R.storeID=S.storeID)
WHERE (P.supplier="Germany")))
What syntax am I missing?
Thanks.