About SQL Code 0803N

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Nripendra Chand
Premium Member
Premium Member
Posts: 196
Joined: Tue Nov 23, 2004 11:50 pm
Location: Sydney (Australia)

About SQL Code 0803N

Post 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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Are you sure that the same data does not exist in the table already?
Any refrential Integrity violation?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post 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. 
Nripendra Chand
Premium Member
Premium Member
Posts: 196
Joined: Tue Nov 23, 2004 11:50 pm
Location: Sydney (Australia)

Post 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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Nripendra Chand
Premium Member
Premium Member
Posts: 196
Joined: Tue Nov 23, 2004 11:50 pm
Location: Sydney (Australia)

Post 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
skcwong
Participant
Posts: 2
Joined: Fri Apr 15, 2005 3:56 pm

Post by skcwong »

I'm having the same problem with DB2 UDB stage (upsert option). Anyone got the solution? Thanks!
anandsh16
Premium Member
Premium Member
Posts: 17
Joined: Tue Dec 12, 2006 3:34 am

Post 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
Post Reply