OT: SQL Integer Math not working
Bob Sneidar
bobsneidar at iotecdigital.com
Mon Mar 20 15:42:56 EDT 2017
Hi all.
I have 3 columns all defined as INT(10) unsigned default 0. I attempt this sql statement:
update service set totalmileage = endmileage - startmileage
I get the error: Error Code: Error Code: 1690. BIGINT UNSIGNED value is out of range in '(`formsgen`.`service`.`endmileage` - `formsgen`.`service`.`startmileage`)'
I used a where clause to elminate possible NULL values, as well as excluding records where startmileage or endmileage <= 0. I cannot get around this. WTH?? This should be really straight forward. I also tried casting both as unsigned but no workie.
Bob S
More information about the use-livecode
mailing list