Error Code 1292 - Truncated incorrect DOUBLE value - Mysql
Solution 1:
This message means you're trying to compare a number and a string in a WHERE
or ON
clause. In your query, the only potential place where that could be occurring is ON ac.company_code = ta.company_code
; either make sure they have similar declarations, or use an explicit CAST
to convert the number to a string.
If you turn off strict
mode, the error should turn into a warning.
Solution 2:
I corrected this error as there was a syntax error or some unwanted characters in the query, but MySQL was not able to catch it. I was using and
in between multiple fields during update, e.g.
update user
set token='lamblala',
accessverion='dummy' and
key='somekey'
where user = 'myself'
The problem in above query can be resolved by replacing and
with comma(,
)