If it's on two different DataBase(catalog) on same Server :
use fully qualified DB names when you query, SEE sample :
SELECT T1*
FROM [DB1].[dbo].[Table1] AS T1
LEFT OUTER JOIN [DB2].[dbo].[Trx] AS T2
ON T1.ID = T2.ID
If it's on two different DataBase(catalog) on different Server :
Use linked server:
http://msdn.microsoft.com/en-us/library/ms188279.aspx[
^]