Page 1 of 1

SQLFetch reported: SQLSTATE = 22018: Native Error Code 802

Posted: Wed Nov 21, 2012 8:09 am
by cipsy
Hi,

I want read data ODBC source (uses DB2 on AS400) and write to Oracle. Job is simple but job aborted. I see this error messages


AS400,0: ODBC function "SQLFetch" reported: SQLSTATE = 22018: Native Error Code = -802: Msg = [IBM(DataDirect OEM)][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]EXCEPTION ERROR 0 OCCURRED DURING *N OPERATION. 6
ODBC function "SQLFetch" reported: SQLSTATE = 22018: Native Error Code = -802: Msg = [IBM(DataDirect OEM)][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]EXCEPTION ERROR 0 OCCURRED DURING *N .........

Thanks your advice

Posted: Wed Nov 21, 2012 9:57 pm
by jhmckeever
http://lmgtfy.com/?q=SQLSTATE+%3D+22018

:-)

Look like you're passing a string to something that doesn't accept a string.

Posted: Tue Nov 27, 2012 3:53 am
by cipsy
Thanks your answer. :) but job is working alone.
When job scheduled i see this error messages.

Posted: Tue Nov 27, 2012 8:37 am
by chulett
Still... are you using job parameters in your ODBC source?

Posted: Tue Dec 04, 2012 8:01 am
by cipsy
This problem is solved.
I dont know why reason but we change the sql.

I find the a line in table1 (have null value and &) . but sql isnt came this line.

example
select a.col1,a.col2,a.col3
from table1 a, table2 b
where a.id_column = b.id_column

a.id_column not joined b.id_column

delete it this line an problem solved. Maybe driver problem maybe line contains a different character.


Thanks ypur helping.

Posted: Tue Dec 04, 2012 8:22 am
by chulett
I've seen many times where whitespace causes odd issues. The stage doesn't need any kind of formatting in the SQL it runs so at the first sign of trouble first thing I do is remove all of the "pretty print" people-centric formatting... tabs, returns, blank lines, comments, etc.

Can't tell you how many times that has helped. In multiple tools.