merging 2 identicle tables

R

RYAN

new to this i have 2 databases that are identicle and use
auto keys which of course are the same in both
databases....i would like to merge these is there a
painless way to do this?

ryan
 
J

John Vinson

new to this i have 2 databases that are identicle and use
auto keys which of course are the same in both
databases....i would like to merge these is there a
painless way to do this?

ryan

No. It's miserable.

If it's JUST the two tables, and you don't care about the autonumber
values and they don't link to any other tables, then yes, it's not
hard - just create an Append query from one of the tables and append
all the fields *except* the autonumber value. These records will be
assigned new autonumbers.

If the value of the existing autonumbers is important, because they
are linked to foreign keys in other tables, it's a major PAIN. You'll
need to change the table from which you are appending to use a Long
Integer instead of an autonumber; set Cascade Updates on all joins
from the table (as deeply as you have tables using this key); run an
Update query to update the key values to a range outside the range of
numbers in the target table; and then run the append query.
 
R

RYAN

THANKS,

ITS GOING TO BE MISERABLE:)

RYAN
-----Original Message-----


No. It's miserable.

If it's JUST the two tables, and you don't care about the autonumber
values and they don't link to any other tables, then yes, it's not
hard - just create an Append query from one of the tables and append
all the fields *except* the autonumber value. These records will be
assigned new autonumbers.

If the value of the existing autonumbers is important, because they
are linked to foreign keys in other tables, it's a major PAIN. You'll
need to change the table from which you are appending to use a Long
Integer instead of an autonumber; set Cascade Updates on all joins
from the table (as deeply as you have tables using this key); run an
Update query to update the key values to a range outside the range of
numbers in the target table; and then run the append query.



.
 
J

John Vinson

THANKS,

ITS GOING TO BE MISERABLE:)

My sympathies, having BTDT.

One serious warning: if you expose the autonumbers to user view (a bad
idea), and particularly if people print them out or write them down,
you must fix not only the tables in the database but also the sheets
of paper, post-it notes, and human memories of everyone who might be
remembering "record 3128" which is about to become "record 7734".
 

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