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

A query that shows recs that don't match 1

Status
Not open for further replies.

CraigBest

Programmer
Aug 1, 2001
545
US
Wondering if anyone can help me out with this...

I have a small access 2003 db with 2 tables in it - industries and waybills. The waybills table relates to the industries table by a code value, a one to many relationship where there can be multiple values on the waybills side.

There are a number of records on the industries table that have no associated waybills. I would like to have a query that will bring me back all the records from industries that do not have any matching records in the waybills table. How would I write a query like that in access?

Thanks


CraigHartz
 
Simply follow the unmatched query wizard.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Is there an unmatched query wizard in 2003... didn't realise

SELECT *
FROM industries LEFT JOIN waybills ON industries.industriesID = waybills.industriesID
WHERE waybills.industriesID is null

assuming that thats how you've named your ID's!!

daveJam

even my shrink says its all your f#@/ing fault
 
Thanks Dave, PH. There is an unmatched query designer in 2003 (took me a while to find it). It did the job in the end after I tweaked the query a bit. Thanks!

CraigHartz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top