Page 1 of 1

About SQL Code 0803N

Posted: Wed Mar 22, 2006 3:21 am
by Nripendra Chand
Hi,

One of my loading job is loading records into a DB2 table. Before loading into table I'm removing the duplicates on the primary key defined in DB2 table. Still I'm getting a lot of following warning msg:
"Hist_Tab: FAILURE
.Error code SQL0803N. Execute array one element at the time"
How can I avoid this msg?

-Nripendra

Posted: Wed Mar 22, 2006 5:04 am
by kumar_s
Are you sure that the same data does not exist in the table already?
Any refrential Integrity violation?

Posted: Wed Mar 22, 2006 6:39 am
by Eric

Code: Select all

SQL0803N One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by index-id constrains table table-name from having duplicate rows for those columns. 

Posted: Wed Mar 22, 2006 10:55 pm
by Nripendra Chand
I'm using upsert method. So if the record is already present in the table, it should update it. Should it still give these warnings?

-Nripendra

Posted: Wed Mar 22, 2006 11:27 pm
by kumar_s
Data gets updated if the key matches and the value varies. And get inserted if Key get differed.
Is there a chance where both key as well as data value are same as the records present in the table.

Posted: Wed Mar 22, 2006 11:49 pm
by Nripendra Chand
Yes, I tried to update the same data. But I think Upsert option verifies keys only. If keys are same it should blindly update all the columns for that row. Should it give warnings in this case?

-Nripendra

Posted: Thu Mar 23, 2006 4:14 pm
by skcwong
I'm having the same problem with DB2 UDB stage (upsert option). Anyone got the solution? Thanks!

Posted: Wed Jun 20, 2007 3:14 am
by anandsh16
[quote="skcwong"]I'm having the same problem with DB2 UDB stage (upsert option). Anyone got the solution? Thanks![/quote]

Is there any solution to this problem..I too getting the same issue..sql code SQL0803N i am getting the warnings ..i am using an upsert option..although the records are getting updated properly.Since there is a warning limit set i am getting the abend due to exceeding the warning limit