RE: remove duplicates

  • From: Michael Dinh <mdinh@xxxxxxxxx>
  • To: "'barb.baker@xxxxxxxxx'" <barb.baker@xxxxxxxxx>, ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 28 Jul 2010 13:07:00 -0700

Take a look at this website for deleting duplicates using analytics.

http://viralpatel.net/blogs/2010/06/deleting-duplicate-rows-in-oracle.html

Michael Dinh : XIFIN : 858.436.2929

NOTICE OF CONFIDENTIALITY - This material is intended for the use of the 
individual or entity to which it is addressed, and may contain information that 
is privileged, confidential and exempt from disclosure under applicable laws.  
BE FURTHER ADVISED THAT THIS EMAIL MAY CONTAIN PROTECTED HEALTH INFORMATION 
(PHI). BY ACCEPTING THIS MESSAGE, YOU ACKNOWLEDGE THE FOREGOING, AND AGREE AS 
FOLLOWS: YOU AGREE TO NOT DISCLOSE TO ANY THIRD PARTY ANY PHI CONTAINED HEREIN, 
EXCEPT AS EXPRESSLY PERMITTED AND ONLY TO THE EXTENT NECESSARY TO PERFORM YOUR 
OBLIGATIONS RELATING TO THE RECEIPT OF THIS MESSAGE.  If the reader of this 
email (and attachments) is not the intended recipient, you are hereby notified 
that any dissemination, distribution or copying of this communication is 
strictly prohibited. Please notify the sender of the error and delete the 
e-mail you received. Thank you.
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Barbara Baker
Sent: Wednesday, July 28, 2010 10:14 AM
To: ORACLE-L
Subject: remove duplicates

oracle 9.2.0.7 on linux
I have some duplicated records in a table (woe_fact_barb)
I cannot come up with the sql to remove these.  Can anyone help?
The only way to identify the duplicate is that there are 2 records with the 
same WO_SID.

   WOE_SID     WO_SID   INVC_AMT
---------- ---------- ----------
   1079559  177694790     7898.1
   1080085  177694790     7898.1
   1079589  177694810   24026.19
   1079663  177694810   24026.19
   1079567  177694858   17088.35
   1080135  177694858   17088.35

I've tried various combinations of sql sorta like this:

sql>delete from woe_fact_barb
  2  (select min(woe_sid)
  3  from woe_fact_barb )
  4  where wo_sid=177694790
  5  /

Nothing I've tried is close.
thanks for any help!
Barb

Other related posts: