ACC1x: Using a Subtract Query to Find Unmatched RecordsID: Q95326
|
This article describes how to create a Subtract query to compare two tables and return a dynaset that includes only those records from the first table that do not have matching records in the second table.
The following example demonstrates how to create a query on two joined
tables that subtracts the matching records, returning only those records
that do not match on the joined field:
NOTE: The following example assumes that you have two tables in your
database called Table1 and Table2 that can be joined on at least one
field.
SELECT DISTINCTROW Customers.[Company Name]
FROM Orders, Customers,
Customers LEFT JOIN Orders
ON Customers.[Customer ID] = Orders.[Customer ID]
WHERE ((Orders.[Customer ID] Is Null));
For more information about unmatched records in version 2.0, search for "Find Unmatched Query Wizard" then "Creating a Query with a Wizard" using the Microsoft Access Help menu.
Additional query words: unmatched differences subtraction
Keywords : kbusage QryJoin
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: March 19, 1999