I am getting -803 error while loading data in DB2.
The data which i am trying to insert is some new entries and doesn't exist in table.
There are 3 Primary keys in which 1 is time stamp and while loading we give it as current time stamp, so there is no chance of duplicate entries.
Joined: 20 Oct 2006 Posts: 6962 Location: porcelain throne
you will receive a -803 on insert when any unique index is violated.
debugging -803's involves more then only concentrating on the 'PRIMARY' index.
Normally, this is known by the coder
- primary index violations afflict programs written by blind people
...problems occur when the coder/designer does an incomplete job of analysis by ignoring other indexes.
that is why I suggested looking at the sqlca
one should first look at the contents of the sqlca when receiving negative sql codes.
in the case of a -803, you first have to establish which index is being violated unstead of assuming that it is the primary.
so, stop pissing around swearing that there could not be duplicates and
1) determine the index being violated
2) use sort to find the dups (based on the offsets of the columns involved with the violated index)