Merge data from two tables

S

s4

Hi,
I have two similar databases. I don't want them to be replicas, but there is
one table in each that I would like to have the same data. The problem is
that some new records are added on one and different new records added on the
other. Is there a way to 'merge' the two tables so that each has the other's
new records and so that in total the records are the same in both. I wouldn't
like to use a front end - back end either.
Thanks
 
K

Ken Sheridan

A UNION query suppresses duplicate rows so will show distinct matched rows
from each table once plus new rows from each. You can use the UNION query as
the basis for an APPEND query to insert the rows into an empty table, so,
having created an empty table with the same columns as the existing ones,
each time you want to update the combined table you can first execute a
DELETE query to empty the combined table, then execute the APPEND query to
fill it.

You should not use an autonumber column as the key of either of the existing
tables of course as this would be likely to create conflicts in the combined
table.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top