Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing data from a table

Status
Not open for further replies.

mchambers

MIS
Aug 28, 2008
56
US
I was wondering if someone can give me a hand.

I have 2 tables. One table has all my clients and the other table has clients that received a certain set of services. I want to join those two tables and remove the clients that received the set of services so that I only get the clients that have not received the services yet. I have tried to pull them out but it is not working. Can anyone help me with this. Thanks
 
something like this:

Code:
SELECT * FROM Clients C
LEFT OUTER JOIN Services S on C.ClientID = S.ClientID
WHERE C.clientID is null

you may want to read up on JOINS, here's an article that i've found helpful Understanding SQL Joins

Leslie
 
I got it I just had to do the following: in the query properties I had to set unique properties to yes.

But thanks very much for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top