Merge two sets of databases

DavidWRouse

Registered User.
Local time
Today, 19:06
Joined
Jul 24, 2003
Messages
42
Merging two databases

I want to merge the data (20 tables) of two databases.

But the key in the PK's could be duplicated.

I was thinking of writing a module to renumber the PK. of each database, and to amend the FK in any table linked.

Then i could just append the one table to the next.

Seems a bit complicated, Does anyone know a better way to merge the tables??
 
Last edited:
Why are you merging databases?
You mean merging DATA? If so your PK's should be AUTONUMBER...It kills me to see that people are using Text or what not for a PK...your PK should be unique..and now you've run into a problem. The solution should have been an autonumber for your PK and maybe your current PK just as a regular field. You can do several things:

1) Add PK as Autonumber
2) Merge the data and compare if a PK exists if so append a digit
 
Sorry I probably did not explain well enough what i wanted to do, I have amended my question.
Thnks 4 your comments, and looking into your idea
 

Users who are viewing this thread

Back
Top Bottom