Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JOIN

Status
Not open for further replies.

annub

Programmer
Apr 23, 2003
33
US
Can i join tables from different server. I am trying to do something like this. Gives me error.

select e.jobnumber,
baandb.dbo.ttisfc001201.t_pdno,
baandb.dbo.ttisfc001201.t_mitm,
baandb.dbo.ttiitm001201.t_dsca
from dfb_erp.baandb.dbo.ttisfc001201 ,
dfb_erp.baandb.dbo.ttiitm001201 ,
emplhrdtltest e
where baandb.dbo.ttisfc001201.t_mitm = baandb.dbo.ttiitm001201.t_item
and baandb.dbo.ttisfc001201.t_pdno = e.jobnumber

baandb - Database
DFB_ERP - different server
 
select e.jobnumber,
sfc.t_pdno,
sfc.t_mitm,
itm.t_dsca
from dfb_erp.baandb.dbo.ttisfc001201 as sfc,
dfb_erp.baandb.dbo.ttiitm001201 as itm,
emplhrdtltest as e
where sfc.t_mitm = itm.t_item
and sfc.t_pdno = e.jobnumber

If that does not work ... what is the error that is produced?

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top