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: Duplicate rows

RE: Duplicate rows

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Thu, 3 Jun 2004 17:07:14 -0700
Message-ID: <B5C5F99D765BB744B54FFDF35F60262109F878B3@irvmbxw02>


If you have more than two duplicate rows, the ">" in step 3) should be an "=".

-----Original Message-----
Rachel Carmichael
...

3) delete the duplicates in the smaller table (runs a LOT faster than trying to delete the duplicates from the source)

...

Sample code below:

...

JRK> with a ">" in the condition below you would end up listing JRK> only one of the duplicate rows in the "dupes" table

3) delete from dupes a where rowid = (select min(rowid) from dupes b
where a.unique_column1=b.unique_column1
and a.unique_column2=b.unique_column2
.... repeat above for all columns

)
/

...



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 Jun 03 2004 - 19:04:12 CDT

Original text of this message

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