Sequence Id
Posted: Mon Feb 25, 2008 2:24 am
Hi,
My source table having 14,00,000 records. When i have tried to insert the records in to database, out of 14,00,000 records only 10,00,000 records only inserted. Even i have checked in source table any records are duplicate. There no records are duplicate. I hope there is some problem in creating Sequenc_Id. I want to create sequence id for all rows. For that one i have written some query which i have mentioned below.
"if STGLDSEQI = -1 then DSLink30.SEQ_I + @PARTITIONNUM +1
else STGLDSEQI + @NUMPARTITIONS".
while i run the job, i got errors are like this
" Error Idx = 12;
DB2 Driver Embedded SQL message: 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 "ADW.MDSE_STYLE_CHAR_E" from having duplicate values for the index key.
SQLSTATE=23505
;
sqlcode = -803;
sqlstate = 23505
Execute failed
the runLocally() of operator [DB2_UDB_Enterprise_76], partition 0 of 1"
Note: Target table LD_SEQ_Id. This column is a key column.
Can anybody help me to resolve this issue?...
My source table having 14,00,000 records. When i have tried to insert the records in to database, out of 14,00,000 records only 10,00,000 records only inserted. Even i have checked in source table any records are duplicate. There no records are duplicate. I hope there is some problem in creating Sequenc_Id. I want to create sequence id for all rows. For that one i have written some query which i have mentioned below.
"if STGLDSEQI = -1 then DSLink30.SEQ_I + @PARTITIONNUM +1
else STGLDSEQI + @NUMPARTITIONS".
while i run the job, i got errors are like this
" Error Idx = 12;
DB2 Driver Embedded SQL message: 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 "ADW.MDSE_STYLE_CHAR_E" from having duplicate values for the index key.
SQLSTATE=23505
;
sqlcode = -803;
sqlstate = 23505
Execute failed
the runLocally() of operator [DB2_UDB_Enterprise_76], partition 0 of 1"
Note: Target table LD_SEQ_Id. This column is a key column.
Can anybody help me to resolve this issue?...