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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dupes

Re: Dupes

From: <lous_at_hotmail.s_p_a_m.com>
Date: 1997/04/22
Message-ID: <NEWTNews.861702172.15520.lourenss@lourenss.hipsys.co.za>#1/1

In Article<335ADC4B.7415_at_ix.netcom.com>, <bbristol_at_ix.netcom.com> writes:  

> Hello,
>
> I have two tables, a base and an incremental with the same layout.
>
> They somehow now have duplicate rows.
>
> I want to find the dupes and ultimately, delete them from the
> incremental table.
>
> What's the best method of doing so?
>
> Thank you!
>
> -Bruce

Use rowid eg.

select name1.x, name1.rowid from

        tabx name1, tabx name2
where name1.x = name2.x
  and name1.rowid not = name2.rowid;

where x is the supposedly unique key, and tabx is the table. Now replace the select with delete syntax and away they go. Carefull though - test with a select first ;)

Cheers
Lourens
lous_at_hotmail.com Received on Tue Apr 22 1997 - 00:00:00 CDT

Original text of this message

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