How to resolve -803 sql code in DB2?

Answers were Sorted based on User's Feedback



How to resolve -803 sql code in DB2?..

Answer / lakshmi

This error is thrown when you try to insert a row with
existing primary key i.e.Duplicate. If you want to insert
the row either you should delete the already existing row
and insert the new row or update the same row with the new
values for other fields

Is This Answer Correct ?    22 Yes 8 No

How to resolve -803 sql code in DB2?..

Answer / venkata sastry

The SQL - 803 error occurs on the violation of a UNIQUE
constraint. Update the record if it already exists rather
inserting new one.

Is This Answer Correct ?    15 Yes 6 No

How to resolve -803 sql code in DB2?..

Answer / lu

Before to insert, it's better to select(retrieve),test
sqlcode when 100 insert when 00 update whenever send
message and abend...You don't have an heache....

Is This Answer Correct ?    5 Yes 3 No

Post New Answer

More DB2 Interview Questions

If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?

0 Answers  


1) I have 3 programs : PGMA, PGMB, PGMC. PGMA calls PGMB and PGMB calls PGMC. I have to do inserts, updates in all the 3 pgms. 2) Say PGMC has done its work successfully and returned to PGMB 3) PGMB had an SQL error while doing some update 4) PGMA has already done some updates before calling PGMB all are running under the same CICS region. What will happen if I issue SYNCPOINT ROLLBACK in PGMB when it abends ? Does all the changes in PGMA,B,C rollback ? (because all the pgms belong to same task).

1 Answers  


What is JOIN and different types of JOIN.

2 Answers   IBM,


What is meant by a unit of recovery?

1 Answers  


Define sqlca.

0 Answers  


what is the input to PLAN? what is the input to DBRM?

4 Answers  


What is cascading rollback?

0 Answers  


what is difference between Static call and Dynamic call? How does it function?

1 Answers   Syntel,


how to resolve -805 . how to see dbrm and package not found

2 Answers   IBM,


Comment whether dclgen is mandatorily used. If not, then what is the point of using it?

0 Answers  


What do you mean by NOT NULL WITH DEFAULT? When will you use it?

3 Answers  


what is the difference between where clause and having clause

2 Answers   IBM,


Categories