Consultor Eletrônico



Kbase 12760: How to eliminate duplicate keys or records in an index?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/29/2008
Status: Verified

GOAL:

How to eliminate duplicate keys or records in an index?

GOAL:

How to avoid duplicate index key records in a Table?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

You must change the record data to eliminate duplicate keys.

There are two ways to access these records:
1. FIND filename WHERE RECID(filename) = recid.
UPDATE filename.

2. FOR EACH filename USE-INDEX : (index without duplicate keys)
UPDATE filename.

Another option to delete the duplicate records without using the recid:

1. disable related indexes
2. open database in single-user mode and delete duplicate records according to wanted criteria
3. run idxfix or idxbuild again


*Version 8.1A and higher will not allow a modification to the record.

The proutil dbname -C idxfix utility should be used when deleting duplicate records. This utility checks the Progress database records and indexes to determine whether an index is corrupt or a record has a missing or an incorrect index. You can specify whether to scan the database, or the indexes, or both. You can run IDXFIX online or offline. Option 6 is called "Delete one record and it's index entries." This option prompts you to specify the recid of the record you want to delete. It deletes one record and all its index entries from the database without checking integrity.