Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: removing duplicate records

Re: removing duplicate records

From: <Jared.Still_at_radisys.com>
Date: Thu, 5 Aug 2004 14:04:23 -0700
Message-ID: <OF66F36A93.941E5D79-ON88256EE7.00737425-88256EE7.0073C291@radisys.com>


oracle-l-bounce_at_freelists.org wrote on 08/05/2004 01:28:19 PM:
> On Thu, 05 Aug 2004 20:57:28 +0200, Carel-Jan Engel
> <cjpengel.dbalert_at_xs4all.nl> 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_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Aug 05 2004 - 16:00:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US