Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
collie
Constraint Violating Yak Guru
400 Posts |
Posted - 2008-01-10 : 11:36:54
|
hi I have a sp that calls 2 different tables. The problem is that the tables are in 2 different servers.dbo.PLCentersDim_temp table is located in server bs/sql_2005 database AHTDW AHT.dbo.Accounts table is located in server bsserver1/bs database ATH.How can I call the 2 tables from the different servers?Thanksinsert dbo.PLCentersDim_tempSELECT case when country like '%Rus%' then CAST('RUSSIA' AS NCHAR (20)) when country like '%U.S%' then CAST('NorthAmerica' AS NCHAR (20)) ELSE CAST('General PLCenter' AS NCHAR (20)) END as PLCenterFROM AHT.dbo.AccountsWHERE AHT.dbo.Accounts.accountkey in (select customercode from dbo.SalesFactTable_temp) and sortgroup IN (455)endWhisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-10 : 11:40:48
|
| Used OPENDATASOURCE or linked server methods[url]http://msdn2.microsoft.com/en-us/library/aa213283.aspx[/url] |
 |
|
|
|
|
|