MySQL Forums
Forum List  »  MySQL for Excel

Re: too many "AND" statements in SQL script
Posted by: Javier Treviño
Date: November 11, 2014 05:25PM

Hi Cory,
Thanks for writing in our forums!

At a first glance MySQL for Excel is behaving as expected. The way you see that queries are sent is because "optimistic updates" are being used, when you update a field the WHERE clause contains all of the fields even if not all are being updated.

So you are getting the "Query did not match any rows in the DB, values in the row 2 may have changed; please refresh values from the DB" error because indeed the value you want to update may have been changed by another user/process/session if you are connected to a multi-user database. Also you could have found a bug, but we would need supporting information to assess this.

You can turn-off optimistic updates to have MySQL for Excel build the where clause the way you are expecting. Bear in mind that means you can accidentally overwrite data that another user may have changed in the time frame after you grabbed data from the server and before you committed your changes.

I strongly suggest you to read about the optimistic updates feature in MySQL for Excel first:

If you have further questions please feel free to post them on this thread.

Best regards.

Javier Treviño
MySQL on Windows Team

Options: ReplyQuote

Written By
Re: too many "AND" statements in SQL script
November 11, 2014 05:25PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.