Jun 18, 2002 #1 whool Programmer Jan 31, 2002 31 AU I want to create a select query that joins two tables from two differnent Databases residing on the same instance of instance of SQL Server 2000. Is there any way of doing this other than setting up one of the Dbs as a linked server? Yael
I want to create a select query that joins two tables from two differnent Databases residing on the same instance of instance of SQL Server 2000. Is there any way of doing this other than setting up one of the Dbs as a linked server? Yael
Jun 18, 2002 #2 tlbroadbent MIS Mar 16, 2001 9,982 US Use the three part table name - database.owner.table. Select a.col1, a.col2, b.col3, b.col4 From ab1.dbo.tableA a Join db2.dbo.tableB b On a.col1=b.col1 Note: You can't set up a database as a linked server. You can add a server as a linked server. Terry L. Broadbent - DBA Computing Links: http://tlbroadbent.home.attbi.com/prog.htm faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions. Upvote 0 Downvote
Use the three part table name - database.owner.table. Select a.col1, a.col2, b.col3, b.col4 From ab1.dbo.tableA a Join db2.dbo.tableB b On a.col1=b.col1 Note: You can't set up a database as a linked server. You can add a server as a linked server. Terry L. Broadbent - DBA Computing Links: http://tlbroadbent.home.attbi.com/prog.htm faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
Jun 18, 2002 Thread starter #3 whool Programmer Jan 31, 2002 31 AU many thanks Terry. Yael Upvote 0 Downvote