--------------- 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:[EMAIL PROTECTED]] > 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: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).