SQLSTATE=S0022, DBMS.CODE=-206

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

SQLSTATE=S0022, DBMS.CODE=-206

Post by Krazykoolrohit »

Hi,
I am having the following error whevever i run the job.

SQLSTATE=S0022, DBMS.CODE=-206
[DataStage][SQL Client][ODBC][DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for Windows, UNIX, and Linux]<column name> NOT COLUMN OF INSERTED/UPDATED TABLE, OR ANY TABLE IN A FROM CLAUSE

this job uses ODBC stage to connect to DB2. I have a similar job connecting to the same table which is working fine. but the other job uses bulk loader to load data.

Has anyone faced this before?

thanx,
rohit
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi Rohit,
I think this is because of the SQL CODE. The message "SQLSTATE=S0022"
is for a invalid column name. Can you check for the column name and where clause in the SQL code.
SQLSTATE=S0022, DBMS.CODE=-206
[DataStage][SQL Client][ODBC][DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for Windows, UNIX, and Linux]<column name> NOT COLUMN OF INSERTED/UPDATED TABLE, OR ANY TABLE IN A FROM CLAUSE
If possible can you post your SQL code..
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

Check the SQL that the Database is generating and see if it matches the columns on Table. This looks like a mismatch of columns.
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

meena wrote:Hi Rohit,
I think this is because of the SQL CODE. The message "SQLSTATE=S0022"
is for a invalid column name. Can you check for the column name and where clause in the SQL code.
SQLSTATE=S0022, DBMS.CODE=-206
[DataStage][SQL Client][ODBC][DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for Windows, UNIX, and Linux]<column name> NOT COLUMN OF INSERTED/UPDATED TABLE, OR ANY TABLE IN A FROM CLAUSE
If possible can you post your SQL code..

This table runs with the bulk loader with the same schema as it is in ODBC stage. The bulk loader works fine without any warnings but the ODBC stage does not. If there was a column mismatch, non of the two stages would have worked
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi Rohit,
Are you using the same SQL code in both jobs. If no then can you post your SQL code.Because from the warning I still think it is the problem with the SQL code.
This table runs with the bulk loader with the same schema as it is in ODBC stage. The bulk loader works fine without any warnings but the ODBC stage does not. If there was a column mismatch, non of the two stages would have worked
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

meena wrote:Hi Rohit,
Are you using the same SQL code in both jobs. If no then can you post your SQL code.Because from the warning I still think it is the problem with the SQL code.
This table runs with the bulk loader with the same schema as it is in ODBC stage. The bulk loader works fine without any warnings but the ODBC stage does not. If there was a column mismatch, non of the two stages would have worked
The Sql code was self-generated. anyways, i deleted the ODBC stage and recreated from scratch including inporting schema from the table. it is working now. guess there was some column name mismatch (even though i was not able to spot it through naked eyes).

thanx anyways.
Post Reply