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: delete duplicate records

RE: delete duplicate records

From: satish p <satish.pullela_at_wipro.com>
Date: Fri, 23 Aug 2002 01:44:18 -0800
Message-ID: <F001.004BDF99.20020823014418@fatcity.com>


hi

delete from temp a where a.rowid < (select max(rowid) from temp b where b.a1 = a.a1 and (b.a2 2 = 0 or b.a2 =1));

output of above delete is given below

        A1 A2
---------- ----------

         1          1
         2          1
         3          0
         4          1

hth
satish
  -----Original Message-----
  From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of M B Shibu   Sent: Friday, August 23, 2002 2:03 PM
  To: Multiple recipients of list ORACLE-L   Subject: delete duplicate records

  A1 A2

    1 0

    1 1

    2 1

    2 1

    3 0

    3 0

    4 0

    4 0

    4 1

  How to delete duplicate records from the above set .In duplicating records the a2 should be 1 others should be deleted

              And if in duplication both a2 are 0 then one of them should exist

  TIA   Shibu


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: satish p
  INET: satish.pullela_at_wipro.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Received on Fri Aug 23 2002 - 04:44:18 CDT

Original text of this message

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