DB2 SQL Errors Codes and Error Messages and Warnings from Error -203 to -205

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-203, SQLSTATE=42702, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
A REFERENCE TO COLUMN
column-name IS AMBIGUOUS
Explanation: An unqualified column name is
ambiguous if more than one table or view identified in
the FROM clause has a column with that name, or if
more than one column of a nested table expression has
that name.
A qualified column name is ambiguous only if the
qualifier is the correlation name for a nested table
expression and the column name is not unique.
A reference to a column of the triggering table in a
CREATE TRIGGER statement is ambiguous if it does
not use the correlation name to indicate if it refers to
the old or new transition variable.
System action: The statement cannot be executed.
Programmer response: If the problem is caused by a
nonunique column name in a nested table expression,
change the nested table expression so that the column
name is unique. If the problem is caused by the use of
an unqualified name, qualify it with a table, view, or
correlation name.
SQLSTATE: 42702

Error: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
name IS AN UNDEFINED NAME
Explanation: The object identified by name is not
defined in the DB2 subsystem. This SQLCODE can be
generated for any type of DB2 object.
SQLSTATE: 42704

Error: DB2 SQL Error: SQLCODE=-205, SQLSTATE=42703, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
column-name IS NOT A COLUMN OF
TABLE table-name
Explanation: No column with the specified
column-name occurs in the table table-name.
System action: The statement cannot be executed.
Programmer response: Verify that the column and
table names are specified correctly (including any
required qualifiers) in the SQL statement.
SQLSTATE: 42703

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