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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query between two tables 1

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I have two tables, TXClips and Shots. The Shots table is a select from in a combo, to allow the user to fill in a field in the TXClips table. I am trying to make a query that will produce a list of Shot choices from the table Shots, where the item in Shots has never been put into the TXClips records. In other words I am trying to fill a list with Shot choices that can be deleted safely as no record in the TXClips uses it. Hope thats clear. Help greatly appreciated.
 
You wanted something like this (SQL code) ?
SELECT S.*
FROM Shots AS S LEFT JOIN TXClips AS T ON S.ShotsID = T.ShotsID
WHERE T.ShotsID IS NULL

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Many thanks PHV, that worked perfectly. Best regards with a star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top