edenmachine
asked on
How can you connect two tables together from two different databases?
I need to run a query that joins two tables from two different databases.
Select * From DatabaseOneName..TableOneN ame Join DatabaseTwoName..TableTwoN ame On some join conditions here
prefix "databaseName.." while specifying the table
from db1.dbo.Table1 a
inner join db2.dbo.Table2 b on a.id = b.id
from db1.dbo.Table1 a
inner join db2.dbo.Table2 b on a.id = b.id
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, they were in different servers so this is what I needed.
So what was the pbm with the above two comments