|
Posted by Erland Sommarskog on 11/23/05 00:47
(andrew@henriettast.freeserve.co.uk) writes:
> I have two databases with multiple tables. Same tables same fileds.
>
> Both databases contain records, but they should not match each other.
>
> (I will run a report for matches before this and delete any data that
> is not current to ensure this is the case)
>
> How do I go about moving data from one of the databases to the other in
> order to create a single database with all the data? Unfortunately my
> SQL is limited and I cannot image how I would work around the unique
> ids. Append or update maybe?
This is difficult to answer, as it is not clear whether the databases
are entirely disjunct, or if there is some overlap. You mention some
unique ids, but how unique are these? Can we trust that ID 35 is the
same thing in both databases? Or are they entirely artificial keys, and
ID 35 could be different entities?
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|