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

which is the most efficient tablespace?? a.simple tablespace. b.partitioned tablespace. c.segmented tablespace. d.none of the above. please post answer with the reason.?

3 Answers  


How do you filter out the rows retrieved from a Db2 table ?

1 Answers  


What is schema in db2?

0 Answers  


How to resolve -917 sql code in DB2?

3 Answers   Cap Gemini,


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

0 Answers  






What is cursor stability?

1 Answers  


What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?

0 Answers   MCN Solutions,


a cursor normally gets closed once we provide a commit . If u try to close the same cursor with close cursor command later after providing the commit will there be any sql-error.

3 Answers  


Can i insert bulk records into a db2 table using qmf of spufi only............!!!

2 Answers  


What is the use of value function?

0 Answers  


Mention the length of physical storage of the given data types of db2 – date, timestamp, time

0 Answers  


What's The Error Code For Unique Index Voilation?

0 Answers   IBM,


Categories