insert failed [2803] secondary index uniqueness violation

Database

insert failed [2803] secondary index uniqueness violation

Okay so I inserted 7 records into the table with ids 1,2,3,4,5,6,7.

Later I realized one of the record is inappropriate ,

hence in order to syncronise,

I deleted all the records with ids 1,2,3,4,5,6,7. Delete was successful.

If I do select 1-7 ids from table , I get no result.

and tried to insert records again with ids 1,2,3,4,5,6.

Now nothing is being inserted and giving me error insert failed [2803] secondary index uniqueness violation.

My table ddl have one primary index and 2 unique index

PRIMARY INDEX PI_ETL_CONTROL ( ETL_CONTROL_KEY ,ETL_OWNER_NM ,ETL_MAPPING_NM ,ETL_SESSION_NM ,TGT_TABLE_NM )

UNIQUE INDEX USIPK_ETL_CONTROL ( ETL_CONTROL_KEY )

UNIQUE INDEX UN_ETL_CONTROL ( ETL_OWNER_NM ,ETL_MAPPING_NM ,ETL_SESSION_NM ,TGT_TABLE_NM );

Please help how to re insert all the six records.

Thanks

1 REPLY
Teradata Employee

Re: insert failed [2803] secondary index uniqueness violation

Which session mode are you using? ANSI or Teradata?