Re: Identify duplicate keys

From: <GO.MSB_at_isumvs.iastate.edu>
Date: Tue, 30 Mar 1993 15:45:43 GMT
Message-ID: <C4pL48.9J_at_news.iastate.edu>


In article <1p8stvINNdj_at_netserver.univ-lille1.fr>, noel_at_citi.citilille.fr (Yves Noel) writes:
>There was an excellent paper on this subject in the 'Bulletin Technique ORACLE'
>France, number 5, write in Autumn 1989. The technique used to eliminate the
>duplicate keys is based on the utilisation of the pseudo-column ROWID. A very
>simple SQL script was given. If you don't find it I can send you this article. Bye !
>
>In article <C4o9C6.8AC_at_da_vinci.it.uswc.uswest.com>, Jeffrey L. DeMent <jld_at_advtech.uswest.com> writes:
>|> Trying to create an index on an Oracle V6 table -- but it's failing
>|> because of duplicate keys. Is there a slick/fast/easy way to identify
>|> the rows with duplicate keys (for subsequent deleting !) ?
>|> Thanks.



This was posted earlier by Martin Jarvis in the uk - from an Oracle Tech. Bulletin, Mar. 1992

DELETE FROM tablename
WHERE ROWID NOT IN
   ( SELECT MAX(ROWID) FROM tablename
  GROUP BY keycolumn1, keycolumn2, etc.)

Marvin Beck Iowa State University Received on Tue Mar 30 1993 - 17:45:43 CEST

Original text of this message