DB2 SQL Errors Codes and Error Messages and Warnings from Error -350 to -352

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-350, SQLSTATE=42962, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
column-name WAS IMPLICITLY OR
EXPLICITLY REFERENCED IN A
CONTEXT IN WHICH IT CANNOT BE
USED
Explanation: The ALTER, CREATE, or DECLARE
GLOBAL TEMPORARY TABLE statement is invalid for
one of the following reasons:
v A LOB, DECFLOAT, or XML column cannot be
specified as a column of the primary key in a
PRIMARY KEY clause.
v A LOB, DECFLOAT, or XML column cannot be
specified as a column of a UNIQUE KEY.
v A LOB, DECFLOAT, XML, or security label column
cannot be specified as a column of a foreign key in a
referential-constraint clause.
v A LOB, DECFLOAT, XML, or security label column
cannot be specified as a column of a parent key in a
REFERENCES clause.
v A LOB, DECFLOAT, or XML column cannot be
specified as a column of a partitioning key for range
partitioning.
v A LOB or XML column cannot be defined in a
temporary table (created global temporary table or
declared global temporary table).
v A LOB, DECFLOAT, or XML column cannot be
defined in a table that has an EDITPROC.
v A LOB, DECFLOAT, or XML column cannot be
specified as a column of an index key, and the result
data type, including the intermediate result, of a key
expression for an index cannot be a LOB,
DECFLOAT, XML, or a distinct type based on a LOB
or DECFLOAT data type. Exception: For an XML
index, only XML columns can be specified, and the
result type of the index key can be DECFLOAT.
v A hidden column or security label column cannot be
specified in a key expression for an index.
v A ROWID, LOB, or XML data type cannot be the
data type of a column in the result table of an
as-result-table clause of a CREATE TABLE or
DECLARE GLOBAL TEMPORARY TABLE statement.
v A security label column column-name exists in the
result table of the as-result-table clause; however, it is
not the only security label column in that result
table. A table can be defined only with a single
security label column.
v An XML column cannot be specified with the SET
DEFAULT or DROP DEFAULT clause.
v A VARBINARY column can not be specified as a
column of an index key when DESC is also specified.
The same restrictions apply to a distinct type column
where the base data type is subject to one of the
restrictions in the list.
System action: The statement cannot be processed.
Programmer response: Correct the syntax and
resubmit the statement.
SQLSTATE: 42962

Error: DB2 SQL Error: SQLCODE=-351, SQLSTATE=56084, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
AN UNSUPPORTED SQLTYPE WAS
ENCOUNTERED IN POSITION
position-number OF THE SELECT-LIST
Explanation: position-number is the position of the first
element in the SQLDA with an unsupported data type.
Either the application requestor or the application
server does not have support for this type. This error
can only occur in a client/server environment.
System action: The statement cannot be executed.
Programmer response: Change the statement to
exclude the unsupported data type. For a select
statement, remove the names of any columns in the
select-list with the unsupported data types.
SQLSTATE: 56084

Error: DB2 SQL Error: SQLCODE=-352, SQLSTATE=56084, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
AN UNSUPPORTED SQLTYPE WAS
ENCOUNTERED IN POSITION
position-number OF THE INPUT-LIST
Explanation: The input SQLDA for an OPEN,
EXECUTE, FETCH, or CALL statement contains an
unsupported SQLTYPE for the parameter in position
position-number. position-number is the position of the
first element in the SQLDA with an unsupported data
type. Either the application requestor or the application
server does not have support for this data type. This
error can only occur in a client/server environment.
System action: The statement cannot be executed.
Programmer response: Change the SQLDA to exclude
the unsupported data type.
SQLSTATE: 56084

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