Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2007

Tip: Looking for answers? Try searching our database.

Selecting non-paring records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dbpeart - 29 Nov 2007 20:17 GMT
Is there an easy/simple way to select all records from table A that DO NOT
have a match in table B?
John Spencer - 29 Nov 2007 20:35 GMT
Open a new query
--Add both tables to the query
--Drag from the field in table tableA to the field in TableB that determines
a match
--Double click on the Join line and select option 2(All in Table A and Match
in TableB)
--Repeat if there is more than one field that determines the records match
-- add the fields from table A that you want to see
-- Add the matching field from table b
-- set its criteria to IS NULL

Run the query.

SQL statement would look like
SELECT TableA.*
FROM TableA LEFT JOIN TableB
ON TableA.PrimaryField = TableB.PrimaryField
WHERE TableB.PrimaryField is Null

OR use the UNMATCHED query wizard.
New Query
Find Unmatched Query Wizard

Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> Is there an easy/simple way to select all records from table A that DO NOT
> have a match in table B?
dbpeart - 30 Nov 2007 00:09 GMT
Thanks!  If I had been more observant I could have figured out the
"Unmatched Query Wizard".  Apologies.

> Open a new query
> --Add both tables to the query
[quoted text clipped - 21 lines]
>> Is there an easy/simple way to select all records from table A that DO
>> NOT have a match in table B?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.