too many "AND" statements in SQL script
Hello,
I am currently using MySQL for Excel and it is working great. I can see all the data in the DB and even refresh the database. However, when I edit a field I am getting an error. I clicked options and review the script prior to executing code. The SQL statement is very long with an "AND" statement for every column in the DB. For example. I update a field in Excel and then the Review script reads:
UPDATE "database"
SET "field I want updated = new value"
WHERE 'id'=1
___________________
This is where I want the code to stop; however it continues on forever with
AND 'feild1'='1'
AND 'field2'='2'
AND goes on for 60 different "AND" statements.
With all the "AND" statements the DB will not update. I brings up error "Query did not match any rows in the DB, values in the row 2 may have changed; please refresh values from the DB"
If I remove all the "AND" statements the script runs perfectly. I looked through options and cannot find a way to remove the "AND" scripts. Is there a way to remove this?
Thanks,
Subject
Views
Written By
Posted
too many "AND" statements in SQL script
3932
November 11, 2014 04:07PM
1832
November 11, 2014 05:25PM
1455
January 06, 2015 12:01AM
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.