This is a discussion on Help with Update within the MySQL Database forums, part of the Database Forums category; So, I'm having issues with this update statement. UPDATE a, b SET nh = nh + TRUNCATE((1000 - SQRT(nP) - nT * ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
So, I'm having issues with this update statement.
UPDATE a, b SET nh = nh + TRUNCATE((1000 - SQRT(nP) - nT * 85 - TRUNCATE((f + m) / 2, 0) - 50 * (10 - n)) / 100, 0) WHERE b.c is TRUE and b.n is NOT 0 Failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0' at line 1 I can't for the life of me figure out what's wrong. All the parentheses are closed. The only thing I can think of maybe is my SET statement is to long. Any Suggestions? Thanks Ryan |
|
|||
|
Ryan Knopp wrote:
> So, I'm having issues with this update statement. > > UPDATE a, b > SET nh = nh + TRUNCATE((1000 - SQRT(nP) - nT * 85 - TRUNCATE((f + m) / > 2, 0) - 50 * (10 - n)) / 100, 0) > WHERE b.c is TRUE and b.n is NOT 0 > > Failed: You have an error in your SQL syntax; check the manual that > corresponds to your MySQL server version for the right syntax to use > near '0' at line 1 > > I can't for the life of me figure out what's wrong. All the parentheses > are closed. The only thing I can think of maybe is my SET statement is > to long. Any Suggestions? > > Thanks > Ryan Figured it out. |