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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Updating a table with data from another SQL install

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-26 : 09:03:34
Mark writes "I have a table that I want to update the contents of one column with the data held in a column on a table held on a different SQL Server registration (server).
Is this possible and if so how would I do it?
Hope this makes sense..."

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-04-26 : 09:10:43
check for sp_addlinkedServer on Book online..

using this proc you can link both the servers and then using update query you can update the records...

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-26 : 10:15:30
After you added other server as Linked Server, try

Update T1
set col=LS.col
from yourTable T1 inner join LinkedServer.dbo.DBName.TableName LS
on T1.keycol=LS.keycol


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -