Query Asking For Exists (1 Viewer)

dynamictiger

Registered User.
Local time
Today, 19:25
Joined
Feb 3, 2002
Messages
270
The following is a query string I want to build in code (I think) to return specific records at runtime. I have knocked up a sample to get it to work first in the query window, however, every time I try and run it the query is telling me I need the keyword Exists. I have looked at my books and can't see a syntax for this keyword.

SELECT tblClientPoolSuburb.ID, qunLetterBase.ClientName, qunLetterBase.ClientAddress, qunLetterBase.ClientSuburb
FROM qunLetterBase INNER JOIN tblClientPoolSuburb ON qunLetterBase.ClientID = tblClientPoolSuburb.ClientID
WHERE (((tblClientPoolSuburb.ID) In (SELECT tblClientPool.PoolSuburb, tblPool.Type, tblPool.Construction, tblPool.PSanitiser, tblPool.PpHControl
FROM tblPool INNER JOIN tblClientPool ON tblPool.PoolMasterID = tblClientPool.Pool
WHERE (((tblPool.Type)=1) AND ((tblPool.Construction)=1) AND ((tblPool.PSanitiser)=1) AND ((tblPool.PpHControl)=1)))));
 

ycnan

Registered User.
Local time
Today, 12:25
Joined
Jul 9, 2003
Messages
10
related EXISTS question

:confused: 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 above mentioned article, 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.
 

Users who are viewing this thread

Top Bottom