[?]How to do Update using OPENROWSET. This Query work fine. SELECT * FROM OPENROWSET('SQLOLEDB','ServerName';'UserName';'Pwd', 'select * from TableName') why update is not working. update OPENROWSET('SQLOLEDB','ServerName';'UserName';'Pwd', 'select * from TableName') set col_Name='1' so how to use Update with OPENROWSET. Rajeev Kumar Srivastava --ALWAYS BE POSITIVE!--
What was the error when using the OPERNROWSET with UPDATE? Referhttp://www.databasejournal.com/features/mssql/article.php/3331881 this link for information. Satya SKJ Moderator http://www.SQL-Server-Performance.Com/forum This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
Ive not used OPENROWSET much but BOL states it can be used in the FROM clause of an UPDATE query. Try this update t set t.col_Name='1' FROM OPENROWSET('SQLOLEDB','ServerName';'UserName';'Pwd','select * from TableName') t