to join tables from different databases in sql server 2000
Posted On January 8, 2008 by Ramesh K Language:
You have to just qualify the table names in your SELECT queries with database name, followed by table owner name. In the following example, Table1 from pubs database and Table2 from northwind database are being joined on the column i. Both tables are owned by dbo.
SELECT a.i, a.j
FROM pubs.dbo.Table1 a
ON a.i = b.iGO