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!

Access Table Merging - Removing Duplicates

Status
Not open for further replies.

CRR1845

MIS
May 2, 2001
1
I do not know how to remove duplicates when merging two tables together. I know how to merge the tables into one, then remove the duplicates from that one big table. But what I need to know is how to move over only the records that are not contained in the other table. If someone could help me I would appreciate it.
 
Create a query with both the table having new records and the target table, related on whatever fields you want to avoid duplicating. Create a left outer join (by double-clicking the relationship line and choosing option 2 (or option 3 if you added the tables in the opposite order).

Drag the * down to the grid from the table with new records. From the other table, drag one of the matching fields, and in its Criteria row enter "Null". The query now selects only records that don't already exist.

At this point you can change the query into an Append query on the target table, or if you prefer you can leave it a Select query and build an Append query on top of it (using the Select query as its input). Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top