Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A group of database in one

Status
Not open for further replies.

Bigpapou

Programmer
May 23, 2001
41
CA
Here's my problem!

I have a couple of databases (identical). There is more than one way to change these so now, my problem is that the data is different in both of them.
What can I do sa that they have the same data?

Don't worry about the tables, their fields are identical twins.
 
Without getting into the whole "why in the world do you have two identical databases and not just one" it sounds like you need a third table to combine all the data in. Put all the data from both tables in it. Then return the data that is unique with a query having unique values set to ON. Joe Miller
joe.miller@flotech.net
 
Creating a third is to much more of the same.

Do an Update query from each table in B to the corresponding table in A. You can (as you are a programmer) do this in code, simply by having an array of the table names and doing a small loop to generate the SQL statement with the table name(s) from the array. Of course, you will loose SOME information where the record exists in both dbs, the record in the "B" record will be overwritten with the "A" record information.

- ALSO - you should "delete" the db with the "B" records as soon as the Update is complete?


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top