In this post, you’ll learn about the error message -802 exception error ‘exception type’ has occurred during ‘operation type’ operation on ‘data type’ data, position ‘position number’ in the IBM DB2 database , the reason why it occurs along with the solution to fix it
IBM DB2 Error Message
-802 exception error ‘exception type’ has occurred during ‘operation type’ operation on ‘data type’ data, position ‘position number’
Reason for the Error
The processing of a SQL arithmetic function or arithmetic expression that was either in the SELECT list of a SQL select statement,in the search condition of a SELECT, UPDATE, or DELETE statement, during the evaluation of a column function, or in the SET clause of the UPDATE statement has encountered an exception error, possibly indicated by ‘exception type’. Possible values for ‘exception type’ are FIXED POINT OVERFLOW, DECIMAL OVERFLOW, ZERO DIVIDE, DIVIDE EXCEPTION, or EXPONENT OVERFLOW. ‘data type’ may indicate the data types of the items being manipulated, and ‘operation type’ may indicate the arithmetic operation that was being performed at the time of the error.� If the error was in the SELECT list of an outer SELECT statement then ‘position number’ may indicate the position of the expression in the select list.� The possible data types are INTEGER, SMALLINT, DECIMAL, and FLOAT.
Examine the SQL statement to see if the cause (or the likely cause) of the problem can be determined.� The problem may be data dependent, in which case it will be necessary to examine the data that was being processed at the time the error occurred.If the arithmetic expression in error was within the SELECT list of the outer SELECT statement then it is advisable to include an indicator variable for all expressions in the SELECT list.� This will enable processing to continue such that non error column and expression values may be returned. See the explanation of SQLCODE� 405 for allowed ranges of numeric data types.