I\'m getting an odd \'Truncated incorrect INTEGER value\' error when I run the following UPDATE query:
update tbl
set projectNumber = right(comments, 7)
wher
As stated in other answers, this is an error as of 2019, which prevents the query from running. To run the query even if there are strings that cannot be converted to numbers, simply use UPDATE IGNORE
.
So for example a minimal version of the original code:
UPDATE IGNORE tbl
SET projectNumber = RIGHT(comments, 7)
WHERE CONVERT(RIGHT(COMMENTS, 7), SIGNED INTEGER) > 0