Unanswered: SQL0803N One or more ...SQLSTATE=23505,
I hit with the above error msg...the exact msg is...
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 "1"
constrains table "TABLEA" from having duplicate rows for those columns. SQLSTATE=23505
What puzzle me is that i have look at the loading data and found none of them exists in TABLEA.
SELECT INDNAME, INDSCHEMA
WHERE IID = <index-id>
AND TABSCHEMA = 'schema'
AND TABNAME = 'table'
Use the appropriate values for schema and table for your error.
This will tell you which index is causing the duplicate error. Then
chack your data closely to locate the duplicates. If you are having problems
finding the duplicates, load the data into an identical table without any constraints (no PK, indexes, and constraints). Then run a query on that table like: SELECT indcol1,indcol2,...,indcoln,count(*) as qty from newtable group by indcol1,indcol2,...,indcoln order by qty
where indcol1,indcol2,...,indcoln are all the columns that comprise the index of the first query. This will give you the count of duplicate values of the index (where qty > 1).