Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DB2 SQL error: SQLCODE: -206, SQLSTATE: 42703 [closed]

Tags:

db2

I am getting this JDBC exception. I googled it but the explanation was very abstract.

DB2 SQL error: SQLCODE: -206, SQLSTATE: 42703

com.misys.liq.jsqlaccess.adapter.jdbcadapter.util.JDBCAdapterException: com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -206, SQLSTATE: 42703, 
like image 298
praveen_mohan Avatar asked Jun 17 '14 07:06

praveen_mohan


People also ask

How do I fix Sqlcode 204?

Verify that the object name was correctly specified in the SQL statement, including any required qualifiers. If it is correct, ensure that the object exists in the system before resubmitting the statement. Check the application compatibility value that is used by your application to ensure that it is set properly.

What does Sqlcode =- 206 mean?

The name of the object that could not be resolved. Possible reasons for this error include: The specified name is not a column of any of the source or target tables or views of the statement.

Is an undefined name Sqlstate 42704 Sqlcode =- 204?

"SQLCODE=-204, SQLSTATE=42704" is a DB2 error code indicating 'object does not exist'; in this case, it is indicating that either the USER_TABLES object is not present, or that the <UserID> user does not have access to read this. USER_TABLES is an Oracle compatibility feature.

How do you avoid errors in DB2?

For a dynamic statement, or for a single static statement, use the scalar function DECIMAL to specify values of the precision and scale for a result that causes no errors. Before you execute a dynamic statement, set the value of special register CURRENT PRECISION to DEC15 or D15. s, where s is a number between 1 and 9.


1 Answers

That only means that an undefined column or parameter name was detected. The errror that DB2 gives should point what that may be:

DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=[THE_UNDEFINED_COLUMN_OR_PARAMETER_NAME], DRIVER=4.8.87

Double check your table definition. Maybe you just missed adding something.

I also tried google-ing this problem and saw this:

http://www.coderanch.com/t/515475/JDBC/databases/sql-insert-statement-giving-sqlcode

like image 132
Fritz Avatar answered Sep 19 '22 05:09

Fritz