Can someone explain to me why this is happening please:
mysql> SELECT * FROM CustomerDetails WHERE Username=’blah’\G *************************** 1. row *************************** EntryID: F83D4109-DCA8-426F-98B1-00B4AF117ACB Username: blah AccountVolume: 0 1 row in set (0.00 sec)
mysql> UPDATE CustomerDetails SET AccountVolume=GREATEST(CAST(AccountVolume-2865 AS SIGNED), CAST(0 AS SIGNED)) WHERE Username='blah'; ERROR 1690 (22003): BIGINT UNSIGNED value is out of range in '(`test`.`CustomerDetails`.`AccountVolume` - 2865)'
Using GREATEST, shouldn’t it be irrelevant whether AccountVolume-INT is signed or unsigned?
How would I go about doing this? I have played quite a bit with CAST here, but I am not having much luck.
Thnx, Chris.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Jun 26
Hal.sz S.ndor Re: Something strange here...
Jun 26, 2017; 08:06
Hal.sz S.ndor
Re: Something strange here...
Jun 26
shawn l.green Fwd: Re: Something strange here...
Jun 26, 2017; 10:53
shawn l.green
Fwd: Re: Something strange here...
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!