DB2 SQL Errors Codes and Error Messages from Error +347 to +361

SQLServerF1

Error: DB2 SQL Error: SQLCODE=+347, SQLSTATE=01605, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE RECURSIVE COMMON TABLE
EXPRESSION name MAY CONTAIN AN
INFINITE LOOP
Explanation: The recursive common table expression
called name may not complete. This warning is based
on not finding specific syntax as part of the iterative
portion of the recursive common table expression. The
expected syntax includes:
v incrementing an INTEGER column in the iterative
select list by 1.
v a predicate in the where clause of the iterative
portion of the form “counter_col < constant” or
“counter_col < :hostvar”.
The absence of this syntax in the recursive common
table expression may result in an infinite loop. The data
or some other characteristic of the recursive common
table expression may allow the successful completion of
the statement anyway.
System action: The statement cannot be executed.
Programmer response: To prevent an infinite loop,
include the expected syntax as described.
SQLSTATE: 01605

Error: DB2 SQL Error: SQLCODE=+354, SQLSTATE=01668, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A ROWSET FETCH STATEMENT MAY
HAVE RETURNED ONE OR MORE
ROWS OF DATA. HOWEVER, ONE OR
MORE WARNING CONDITIONS
WERE ALSO ENCOUNTERED. USE
THE GET DIAGNOSTICS STATEMENT
FOR MORE INFORMATION
REGARDING THE CONDITIONS
THAT WERE ENCOUNTERED
Explanation: A rowset FETCH statement encountered
one or more warning conditions. Use the GET
DIAGNOSTICS statement to obtain information about
the conditions that occurred, and to determine if data
was returned. It is possible that one or more rows of
data were returned. If the row information that was
returned for the row that encountered the condition is
incomplete, do not use the data for the row that
encountered the condition, such as displaying or
printing the data.
System action: DB2 processed the statement
successfully, but with a warning that the fetching of
some rows might have encountered warnings.
Programmer response: Analyze the conditions to
determine whether follow-up actions are needed. The
GET DIAGNOSTICS statement can be used to
determine which additional actions might be necessary.
Attention: It is also possible that an end of data
condition was detected. SQLERRD3 and GET
DIAGNOSTICS can be used to determine if all of the
requested rows were fetched or if a partial rowset was
returned.
SQLSTATE: 01668

Error: DB2 SQL Error: SQLCODE=+361, SQLSTATE=0168B, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
COMMAND WAS SUCCESSFUL BUT
RESULTED IN THE FOLLOWING:
msg-token
Explanation: During the processing of a command
such as a BIND PACKAGE or DROP or FREE
PACKAGE, a condition occurred, as specified by
msg-token, and the command needs to be examined.
System action: The request was successful.
User response: Evaluate the information contained in
msg-token to determine if the results were as expected.
SQLSTATE: 0168B

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