April 26th, 2013, 10:00 AM
Join Date: Apr 2013
Time spent in forums: 31 m 3 sec
Reputation Power: 0
Error Code: 1292. Truncated incorrect INTEGER value: '201303100000068716450-001'
I'm having trouble with a simple MySQL query. I'm doing a count case :
create table newtable as
count(case when field1='value1' and field2='value2' then field3 else null end) as result1,
count(case when field1='value1' and field2='value3' then field3 else null end) as result2
and I keep getting "Error Code: 1292. Truncated incorrect INTEGER value: '201303100000068716450-001'". The field that I'm counting (field3) is a varchar.
If I run the query without creating a table from the results, I don't get an error. If I create a view, I don't get an error. Its only when I create a table.
Please help me figure this out !!!!