When I try to sum up a integer column in Sybase, I get arithmetic overflow error, how to fix it?
SELECT SUM(columnname) FROM tablename
How-To
Simply cast this column to big integer can solve this problem, the updated query SQL statement is as bellows;
SELECT SUM( cast(columnname as BIGINT)) FROM tablename
No comments:
Post a Comment