Merge data from two tables

  • Thread starter Thread starter s4
  • Start date Start date
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
 
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
 
Back
Top