title: Update to Openrowset SQL SERVER 2008
body: <p>I'm trying to do an UPDATE action to a remote table from a local query. Obviously i know it should be with an OPENROWSET but i don't know how to do it.</p>
  
  <p>I know you can Insert to an OPENROWSET doing something like this:</p>
  
  <pre><code> set @cadsql = convert(varchar(max),
    'insert into openrowset(''SQLOLEDB'','''+@cadcon+''','+@bd+'.ctoxtractor.lm_vehiculos) ' + char(13) + 
    '           (cuenta,corporativo,economico,ctatipotractor,sctatipotractor,ultcambio,ciausu,usuario,estatusoper) ' + char(13) + 
    'select 423,fv.vehic,fv.numeco,9802,0,getdate(),0,''ADMIN'',fv.estatusoper ' + char(13) + 
    'from ficvehic fv ' + char(13) + 
    'order by fv.vehic ')
  
   exec (@cadsql) 
  </code></pre>
  
  <p>Or that i can do a select like this:</p>
  
  <pre><code>SET @cadsql = 'SELECT * FROM OPENROWSET(''sqloledb'',''driver=sql server;server='+@server+';database='+ @database +';uid='+@user+';pwd='+@password+''',' +
  '''SELECT Column1, column2,...  
     FROM table'')'
  
  INSERT INTO another_table
  exec (@cadsql)
  </code></pre>
  
  <p>But i havn't come up with a solution for updating. Is that possible?</p>
  
  <p>Thanks in advance!</p>