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
 SQL Server Development (2000)
 Updating tables using linked servers

Author  Topic 

msbolton
Starting Member

12 Posts

Posted - 2003-03-21 : 06:54:00
I am trying to update an existing table using a linked server. I cannot get the four part reference to work so I am using the open query method.

What I am trying to do is pass a variable to the openquery so that it does not need to return a massive dataset.

One way I can think of doing this is to return the records from the exiting table and then loop trough each row passing a variable to the open query method. The openquery should then return only one record and this can be used to update the current row. Does anyone know a way of doing this?

If poissble I would much prefer to do this as a single update statement but I am not aware of a way of doing it.

Any help would be much appreciated.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-03-21 : 06:55:57
Please do not cross post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=24754

Go to Top of Page
   

- Advertisement -