title: update in MSSQL of MySQL Database via Linked MySQL-Database
body: <p>I'm using MSSQL Server 2008.
  I'm trying to update a MySQL database. I joined the MSSQL-Database with the MySQL-Database and now trying to complete the update, but having a strange problem.</p>
  
  <p>When I do the following Query, I get a limited amount of results:</p>
  
  <pre><code>select *
  FROM [SQL-Database].[dbo].[Table] as c left join
  openquery(MYSQL, 'select * from MySQL-Database.Table')
  on c.KuNr=kunden_id collate German_PhoneBook_BIN
  where c.Auswahltyp='2' and c.[gelöscht]=0 
                         and c.[Mietzeit bis]&gt;GETDATE() and c.aktiveMail&gt;'0'
  </code></pre>
  
  <p>When I do the update, it updates ALL rows in database:</p>
  
  <pre><code>update openquery(MYSQL, 'select * from MySQL-Database.Table')
  set paket_id=7
  FROM [SQL-Database].[dbo].[Table] as c left join
  openquery(MYSQL, 'select * from MySQL-Database.Table')
  on c.KuNr=kunden_id collate German_PhoneBook_BIN
  where c.Auswahltyp='2' and c.[gelöscht]=0 
                         and c.[Mietzeit bis]&gt;GETDATE() and c.aktiveMail&gt;'0'
  </code></pre>
  
  <p>The difference is just Select and Update, but it's kind of ignoring the "where" in the update.</p>