DB2 SQL Errors Codes and Error Messages and Warnings from Error -183 to -185

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-183, SQLSTATE=22008, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
AN ARITHMETIC OPERATION ON A
DATE OR TIMESTAMP HAS A
RESULT THAT IS NOT WITHIN THE
VALID RANGE OF DATES
Explanation: The result of an arithmetic operation is a
date or timestamp that is not within the valid range of
dates which are between 0001-01-01 and 9999-12-31.
System action: The statement cannot be executed.
Programmer response: Examine the SQL statement to
see if the 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 processed at
the time the error occurred.
SQLSTATE: 22008

Error: DB2 SQL Error: SQLCODE=-184, SQLSTATE=42610, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
AN ARITHMETIC EXPRESSION WITH
A DATETIME VALUE CONTAINS A
PARAMETER MARKER
Explanation: The specified arithmetic expression
contains a parameter marker improperly used with a
datetime value.
System action: The statement cannot be executed.
Programmer response: Correct the indicated
arithmetic expression.
SQLSTATE: 42610

Error: DB2 SQL Error: SQLCODE=-185, SQLSTATE=57008, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE LOCAL FORMAT OPTION HAS
BEEN USED WITH A DATE OR TIME
AND NO LOCAL EXIT HAS BEEN
INSTALLED
Explanation: The local format option has been used
with a datetime value and no datetime exit has been
installed. This may occur if the LOCAL DATE
LENGTH or LOCAL TIME LENGTH on the Installation
Application Programming Defaults Panel indicated that
an exit for datetime was supplied, but in fact the exit
supplied by DB2 was not replaced. This may also occur
if the datetime exit was replaced and the corresponding
LOCAL DATE LENGTH or LOCAL TIME LENGTH on
the Installation Application Programming Defaults
Panel was not set to a nonzero value.
System action: The statement cannot be executed.
Programmer response: Contact the system
programmer about installation of the date or time exit.
SQLSTATE: 57008

Above are list of DB2 SQL Errors and Warnings from Error -183 to -185 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 *