DB2 SQL Errors Codes and Error Messages and Warnings from Error -413 to -415
Error: DB2 SQL Error: SQLCODE=-413, SQLSTATE=22003, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
OVERFLOW OCCURRED DURING
NUMERIC DATA TYPE CONVERSION
Explanation: During processing of the SQL statement,
an overflow condition arose when converting from one
numeric type to another. Numeric conversion is
performed according to the standard rules of SQL.
System action: The statement cannot be processed. No
data was retrieved, updated, or deleted.
Programmer response: Examine the syntax of the SQL
statement to determine the cause of the error. If the
problem is data-dependent, it might be necessary to
examine the data processed at the time of the error.
Error: DB2 SQL Error: SQLCODE=-414, SQLSTATE=42824, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A LIKE PREDICATE IS INVALID
BECAUSE THE FIRST OPERAND IS
NOT A STRING
Explanation: The data type of the first operand of the
LIKE predicate must be a character string, graphic
string, or binary string.
System action: The statement cannot be executed.
Programmer response: Specify the predicate so that
the data type of each operand is a character string or a
Error: DB2 SQL Error: SQLCODE=-415, SQLSTATE=42825, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE CORRESPONDING COLUMNS,
column-number, OF THE OPERANDS OF
A SET OPERATOR ARE NOT
Explanation: The data types of the corresponding
columns of a UNION, EXCEPT, or INTERSECT set
operator are not compatible, or the corresponding
columns do not have the same field procedure. The
relative position of the value in the select list is
column-number. Refer to SQL Reference for the rules
about data type compatibility.
This error is issued if one of the columns is a distinct
type, and the other column is not a distinct type, or the
other column is a different distinct type. This error
code is also issued if one column is defined with a field
procedure, and the other column is not defined with
the same field procedure. If corresponding columns
have field procedures, they must both be defined with
the same field procedure.
System action: The statement cannot be processed.
Programmer response: Check the data types of the
specified columns and correct the statement containing
the set operator to ensure that all corresponding
columns have comparable column descriptions. A
CAST specification can be used to make the data type
of the columns compatible.
Above are list of DB2 SQL Errors and Warnings from Error -413 to -415 received while performing certain operation against DB2 Database or related products.
SQLCODE – Regardless of whether the application program provides an SQLCA or a stand-alone variable, SQLCODE is set by DB2 after each SQL statement is
executed. DB2 conforms to the ISO/ANSI SQL standard as follows:
If SQLCODE = 0, execution was successful.
If SQLCODE > 0, execution was successful with a warning.
If SQLCODE < 0, execution was not successful.
SQLCODE = 100, “no data” was found. For example, a FETCH statement returned no data because the cursor was positioned after the last row of the result table.
SQLSTATE – SQLSTATE is also set by DB2 after the execution of each SQL statement. Thus, application programs can check the execution of SQL statements by testing SQLSTATE instead of SQLCODE.
Hope this was helpful.
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.