Make Table and update without adding duplicates

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
149
Good Morning! I have a question about creating a table from two different tables without adding duplicate information. I have two tables that will contain some of the same information but not all. There will only be a few duplicates but I want to be sure that they are not in the new table. How can I update the new table without bringing over duplicates?

Thank
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
It really depends on how you are defining a "duplicate" record. Do all fields have to be the same, or just some key ones?

If you have a "key" field that must be unique, the easiest thing is to make the field a Primary Key field in your new table. Then it will not allow you to enter duplicates records based on this (the first one will add and all duplicates will fail).

If you are including ALL fields when determining if a record is a duplicate, then you can join both tables together in a UNION query. By default, I believe that UNION queries combine all duplicates. Then you can use this UNION query in your Append or Make Table Query (however you are building your new table).
 
Upvote 0
Perfect, thanks. I do have a primary key field that are job numbers. These are unique for each record. I really appreciate the help.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,685
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top