|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Newbie Q: How to Combine data from two tables from two different databasesHi
I have two separate SQL server databases: DB1 and DB2 Both databases contains similar tables and I have to combine some of the like tables together. If I create an INSERT INTO statement, how do I reference the DB1 and DB2 specific tables? I will be appreciative for responses or links to areas that I can further read up. TIA Michelle SELECT ... FROM DB1.dbo.tblname
-- Show quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "Michelle" <nospam_mbytwo-news@yahoo.com.au> wrote in message news:12ak1vpj5epfn00@corp.supernews.com... > Hi > > I have two separate SQL server databases: DB1 and DB2 > > Both databases contains similar tables and I have to combine some of the like tables together. > If I create an INSERT INTO statement, how do I reference the DB1 and DB2 specific tables? > > I will be appreciative for responses or links to areas that I can further read up. > > TIA > Michelle > > Thank you for your reply. Much appreciated
Michelle Show quote "Tibor Karaszi" <tibor_please.no.email_kara***@hotmail.nomail.com> wrote in message news:ewyCnQznGHA.4864@TK2MSFTNGP04.phx.gbl... > SELECT ... FROM DB1.dbo.tblname > > -- > Tibor Karaszi, SQL Server MVP > http://www.karaszi.com/sqlserver/default.asp > http://www.solidqualitylearning.com/ > > > "Michelle" <nospam_mbytwo-news@yahoo.com.au> wrote in message > news:12ak1vpj5epfn00@corp.supernews.com... >> Hi >> >> I have two separate SQL server databases: DB1 and DB2 >> >> Both databases contains similar tables and I have to combine some of the >> like tables together. >> If I create an INSERT INTO statement, how do I reference the DB1 and DB2 >> specific tables? >> >> I will be appreciative for responses or links to areas that I can further >> read up. >> >> TIA >> Michelle >> >> > > Use http://www.sqlscripter.com to script you data.
Show quote "Michelle" wrote: > Hi > > I have two separate SQL server databases: DB1 and DB2 > > Both databases contains similar tables and I have to combine some of the > like tables together. > If I create an INSERT INTO statement, how do I reference the DB1 and DB2 > specific tables? > > I will be appreciative for responses or links to areas that I can further > read up. > > TIA > Michelle > > > |
|||||||||||||||||||||||