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!

Minus Query - get rid of duplicates

Status
Not open for further replies.

H1004

MIS
Oct 28, 2003
136
US
Is there a way to query in Access where It shows the rows from one table without the values
that appear in another table.
Example
Table 1 Table 2
111 111
222 222
333
444

The query will result to 333 and 444.
Basically, it is kind of like the opposite of UNION query.
Any suggestion is greatly appreciated.
 
Carry out a left outer join. In your select, WHERE TABLE2.keyfield IS NULL will show all the missing values.

 
I believe there's a MINUS query.

Select [Field] FROM table1 MINUS Select [Field] FROM table2
 
Use the Find Unmatched Query wizard.
1. Go to the Database window.
2. Click Queries.
3. Click New.
4. Choose the Find Unmatched Query wizard. (If you do not see it, you must install it from the MS Office CD.)
a. Select the table with the data you want. Hit OK.
b. Select the table that doesn't have the data. Hit Next.
c. Select the field name you are comparing.
d. Finish the wizard.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top