DB2 SQL Errors Codes and Error Messages and Warnings from Error -109 to -112

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-109, SQLSTATE=42601, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
clause CLAUSE IS NOT PERMITTED
Explanation:
The clause you specified is not allowed. If the clause
was issued as a part of a CREATE INDEX, CREATE
TABLE, CREATE TABLESPACE, ALTER TABLESPACE,
ALTER TABLE, or ALTER INDEX statement, then refer
to the appropriate section of SQL Reference for a
description of the valid use of clauses for the statement.
If the clause was issued for a ALTER TABLESPACE,
then you are not allowed to explicitly state a LOGGED
or NOT LOGGED clause for an XML table space.
System action: The statement cannot be executed.
Programmer response: Correct the SQL statement.
SQLSTATE: 42601

Error: DB2 SQL Error: SQLCODE=-110, SQLSTATE=42606, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INVALID HEXADECIMAL CONSTANT
BEGINNING constant
Explanation: The string constant that begins with the
specified string is invalid because it has at least one of
the following errors:
v the string constant contains one or more characters
that are not valid hexadecimal digits
v the string constant does not have an even number of
digits
v for a UX or GX string constant, the number of digits
is not a multiple of 4
System action: The statement cannot be executed.
Programmer response: Correct the invalid string
constant.
SQLSTATE: 42606

Error: DB2 SQL Error: SQLCODE=-112, SQLSTATE=42607, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE OPERAND OF AN AGGREGATE
FUNCTION INCLUDES AN
AGGREGATE FUNCTION, AN OLAP
SPECIFICATION, OR A SCALAR
FULLSELECT
Explanation: The operand of an aggregate function
can be either an expression or DISTINCT followed by
an expression. The operand cannot be another
aggregate function, an OLAP specification, or a scalar
fullselect.
System action: The statement cannot be processed.
Programmer response: Correct the use of the
aggregate function to eliminate the invalid expression
and reissue the statement. Refer to Chapter 3 of SQL
Reference for information about the proper usage of
aggregate functions.
SQLSTATE: 42607

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