z36_id2: cannot CREATE UNIQUE INDEX
- Article Type: General
- Product: Aleph
- Product Version: 18.01
Description:
You see these messages in trying to load or index z36 records:
CREATE UNIQUE INDEX IOT50.Z36_ID2 ON IOT50.Z36 (Z36_NUMBER ASC) *
ERROR at line 1:
ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
Resolution:
These messages indicate that the z36 file contains duplicate z36_id2 values. The z36_id2 is built on the z36_number (a unique number for each loan). Its value should be obtained from the z52 (util g 2).
But what we found in this database, by doing sql:
select z36_number from z36 group by z36_number having count (*) > 1;
was that there were 12 z36 records which had '000000000' for their z36_number. We did this sql to change it to a unique value:
update z36 set z36_number = substr(z36_rec_key,7,9) where z36_number = '000000000';
We were then able to do util a/17/2 for z36_id2 to create the z36_id2.
[See also KB 8192-2155, a related problem.]
Additional Information
faq
- Article last edited: 10/8/2013