MySQL error code 1292 -
when running query below keep getting warning:
warning | 1292 | truncated incorrect double value: 'resolved date'.
i'm trying extract strings dates str_customvalue
. why did date(date(str_customvalue)) not null
.
select case str_category when ('resolved date' , (status = 'closed') , (date(str_customvalue) not null) ) cast(str_customvalue datetime) else cast(str_diff_date` datetime) end last_diff_date table
is there way remove warning? query works fine, in order script pass qa need remove warning.
i solved issue using if() statement such:
select if ( str_category = 'resolved date' , , (status = 'closed') , (date(str_customvalue) not null, cast(str_customvalue datetime), cast(str_diff_date` datetime)) last_diff_date table
Comments
Post a Comment