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

Home -> Community -> Mailing Lists -> Oracle-L -> RES: Script that will remove redundant rows from table

RES: Script that will remove redundant rows from table

From: Miguel Farenzena <miguel.farenzena_at_marcopolo.com.br>
Date: Tue, 15 May 2001 12:35:46 -0700
Message-ID: <F001.00303E3B.20010515110612@fatcity.com>



BEGIN
  LOOP
    DELETE FROM &table_name
     WHERE ROWID IN (SELECT MIN (ROWID)
                       FROM &table_name
                      GROUP BY &column_list
                     HAVING COUNT (*) > 1);
    EXIT WHEN SQL%NOTFOUND;
  END LOOP;
  COMMIT;
END;

> -----Mensagem original-----
> De: Haskins, Ed [mailto:Ed.Haskins_at_VerizonWireless.com]
> Enviada em: Tuesday, May 15, 2001 02:46 PM
> Para: Multiple recipients of list ORACLE-L
> Assunto: Script that will remove redundant rows from table
>
>
> A few months ago I remember seeing a script that enabled the
> removal of
> redundant rows in a table. Can someone please forward or
> point me to such a
> script.
>
> I have an Oracle Names server that stores the database
> connect descriptors
> in a table within the Region Database. I've loaded these
> connect descriptors
> from many SQLNET.ora files throughout the enterprise. My
> problem is that
> there exists duplicates from the multiple SQLNET.ora files. I
> really want to
> clean this up so that only one entry per connect descriptor
> exists. I think
> that a generic script for any table will work in this situation.
>
> Thanks,
> Ed Haskins
> Oracle DBA
> Verizon Wireless
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Haskins, Ed
> INET: Ed.Haskins_at_VerizonWireless.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).
>
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Miguel Farenzena
  INET: miguel.farenzena_at_marcopolo.com.br

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 Tue May 15 2001 - 14:35:46 CDT

Original text of this message

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