DB2 SQL Errors Codes and Error Messages and Warnings from Error -410 to -412

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-410, SQLSTATE=42820, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A NUMERIC VALUE value IS TOO
LONG, OR IT HAS A VALUE THAT IS
NOT WITHIN THE RANGE OF ITS
DATA TYPE
Explanation: The specified value is too long. A
floating-point string has a maximum length of 30
characters. A decimal floating-point string has a
maximum length of 42 characters.
System action: The statement cannot be executed.
Programmer response:
Correct the indicated string value.
SQLSTATE: 42820

Error: DB2 SQL Error: SQLCODE=-411, SQLSTATE=56040, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
CURRENT SQLID CANNOT BE USED
IN A STATEMENT THAT
REFERENCES REMOTE OBJECTS
Explanation: A reference to the CURRENT SQLID
special register is invalid in a statement that contains
the three-part name or alias of an object that is remote
to the remote server.
System action: The statement cannot be processed.
Programmer response: Remove either the reference to
CURRENT SQLID or the reference to the remote object.
SQLSTATE: 56040

Error: DB2 SQL Error: SQLCODE=-412, SQLSTATE=42823, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE SELECT CLAUSE OF A
SUBQUERY SPECIFIES MULTIPLE
COLUMNS
Explanation: In the context in which it was used in
the SQL statement, the subquery can have only one
column specified in its SELECT clause.
System action: The statement cannot be executed.
Programmer response: Correct the syntax of the SQL
statement. Refer to chapter 4 of SQL Reference for
information about restrictions on the syntax for
subqueries.
SQLSTATE: 42823

Above are list of DB2 SQL Errors and Warnings from Error -410 to -412 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.

Thanks,
SQLServerF1 Team
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *