FAQ
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
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).

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedMay 15, '01 at 7:35p
activeMay 15, '01 at 7:35p
posts1
users1
websiteoracle.com

1 user in discussion

Miguel Farenzena: 1 post

People

Translate

site design / logo © 2022 Grokbase