Re: Duplicat keys
Posted in 1994
> While creating a "unique key index" on a file of about
> 190k records I have incurred a duplicate record. How do I
> find the record(s) with the duplicate key?
>
The following script will select the duplicates. It would work
faster if you put a non-unique index on the key field before
you run it.
select KEY_FIELD, count(*) from TABLE
group by KEY_FIELD having count(*) > 1
Replace KEY_FIELD and TABLE with the correct names from
your database.
Regards - Lester
#############################################################################
# Lester Knutsen lester@access.digex.net #
# Advanced DataTools Corporation Voice: 703-256-0267 #
# Grant group privileges for Informix databases with DB Privileges #
#############################################################################