1
-----------
SQL0802N Arithmetic overflow or other arithmetic exception occurred.
SQLSTATE=22003
bculinp@prodbcuadmn01mgt:~/arun/year_of_service> db2 "select card from
syscat.tables where tabname='YEAR_OF_SERVICE'"
CARD
--------------------
2198695968
1 record(s) selected.
Whats happening? Is this a known bug that we have to typecast in case
the count gets greater than 1 BiL??
The result of the ‘COUNT’ function is a large integer (INTEGER or INT)
32 bit; around 2^32/2.
Regards
Salvatore Vacca
check the error description, self explanatory :
This error may also be returned when column functions cannot
handle the value that is returned by the SQL statement. For
example, issuing a SELECT COUNT statement against a table that
has more rows than defined by the MAX_LONGINT_INT SQL limit will
cause an arithmetic overflow error. Consider using the COUNT_BIG
column function for tables with more than 2 147 483 647 rows.