Wednesday, March 28, 2012

merge databases

I have 2 database, one has data and one is being created on my handheld. Is there a way to merge the database together so I get the data in the tables I need in the database being create or can I add tables to the existing database so I can use that for my testing?

here is the issue;

database 1 has tables with data - but does not have all the tables I need. - pre-existing

database 2 is being created when I start my app, and creates the tables I need but no data and not all the tables.

Is there a way to merge these to, so I don't have to create a huge insert statements for each tables I need data for?

or can I do a select from database 1 and insert the records into database 2?

example: insert into tbl1 (name) select database 2.table(col1) from tbl1, is this possible?

No. "Huge" insert/select/create statements are needed to do that.

|||how would I do that without creating a new database? How would I create the tables for the existing database?|||To create the tables in the existing database, use the "CREATE TABLE" statement.|||

Good day all,

I too am having the same issue. I have 2 databases with diverging information. The tables should all be identical. I've got different developers adding data to 2 different databases. Rather than re-entering data to one or the other database, I'd like to be able to merge the databases. I am by no means a SQL developer, so i'm not terribly familiar with the T-Sql commandset. If there is any more information on this subject, I will be watching this thread.

Thank you in advance for any assistance!

No comments:

Post a Comment