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)
 OPENQUERY Update

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-04 : 08:18:19
Art writes "I have 2 servers one 6.5 and the other 7.O. I can use openquery to select data from the 6.5 server and insert it into the 7.O server with no problem. I would like to use the openquery method to update data on the 7.0 server from 6.5 server and have not been able to make it work. I am probably using the wrong syntax unless its not possible to use open query in this manner.

Example :
t1 = table on Server7.0
t2 = table on 6.5
Query would be run on Server 7.0 where table t1 is


Openquery ('Server7.0, " Update t1
Set t1.price = t2.price
INNER JOIN t2
ON t1.inovoice = t2.invoice
Where t1.date = now)

Any help will be appreciated

Thanks"
   

- Advertisement -