Re: Eliminating Dup Records

From: Martyn Jones <martyn1>
Date: 1996/07/19
Message-ID: <4sncpo$3hmo_at_news-s01.ny.us.ibm.net>#1/1


In article <31EE6504.667F_at_CAMBER.COM>, M Rajeshwar <MR1154_at_CAMBER.COM> says:
>
>Since the primary key constraints were disabled, one of my tables now is
>flooded with duplicate records. I had known a method of maintaing
>unique records, deleting duplicate records, but not able to recall it.
>
>Can anyone help me out in this regard ?
>
>Thanks
>
>Raj

It's a long time since I did thos one, but you may care to try the following (test it first).

DELETE FROM TABLE my_table
WHERE primary_key = primary_key
AND row_id > row_id

Martyn Jones
Iniciativa para Data Warehouse
San Lorenzod de El Escorial Received on Fri Jul 19 1996 - 00:00:00 CEST

Original text of this message