Re: removing duplicate records

  • From: Jared.Still@xxxxxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 5 Aug 2004 14:04:23 -0700

oracle-l-bounce@xxxxxxxxxxxxx wrote on 08/05/2004 01:28:19 PM:
> On Thu, 05 Aug 2004 20:57:28 +0200, Carel-Jan Engel
> <cjpengel.dbalert@xxxxxxxxx> wrote:
> > Tom had an elegant solution for this in last OraMag using analytics.
> 
> too many brackets for me.
> 
> delete from emp where rowid in
> (select rowid from emp
> minus 
> select min(rowid) from emp
> group by id);
> 
> fast too. 
> 


Slick.  The problem I have with deleting duplicates is this:

What constitutes a duplicate row?

All columns the same values?

Or just having some key columns as duplicate?

Deleting rows as duplicates based on the value of a key 
column could cause the deletion of rows that you may 
actually want to retain.

Determinination of what rows should be deleted may require
examination of the data by someone that is familiar with it.

Jared


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: