By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,259 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,259 IT Pros & Developers. It's quick & easy.

How to move two separate databases into one?

P: n/a
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?

Thanks in advance

Andrew

Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
(an****@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, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.