0

Dear All,
I got a query where I would like to select the clientName from tblClient but with condition that this clientID does not exist in another table call tblCDSValidity. I tried like this but it failed.

SELECT tblClient.clientID, tblClient.clientName FROM tblClient,tblCDSValidity Where tblClient.clientStatus='a' And tblClient.clientID!=tblCDSValidity.clientID ORDER BY tblClient.clientName
2
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by newbie14
1
SELECT clientID, clientName 
FROM tblClient
WHERE clientStatus='a' 
AND clientID NOT IN (SELECT clientID FROM tblCDSValidity)
ORDER BY clientName
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.