Hi,
You can use OpenRowSet/OpenQuery to get data from different database located on different server.
You can write query as:
SELECTa.*
FROMa
INNER JOIN OPENROWSET('SQLOLEDB','ServerAddress';'UserName';'Password',
'select * from Table
') b
ON a.ID = b.ID
Note: It might get an error that "Ad Hoc Distributed Queries" is disabled.
You can enable it by this way:
Let me know if it helps you in any way.
Thanks,
Tejas