Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: Oracle sqlplus way to capture all duplications and removal.
colocoloc_at_yahoo.com (ColoC) wrote:
>Hi, is there someone to help me?
>
>I have got a data duplication case in a big Oracle 8 table. Many of
>the records were processed and loaded twice, meanwhile there are much
>more good records without duplication. The table has 60 fields for
>each record.
>
>Is there a simple Oracle sqlplus way to capture all these duplications
>and remove the duplications?
>
>Thanks.
>
>ColoC
Here is one method that was posted to this group some time ago..
delete from your_table where rowid in (
select rowid
from your_table x
where x.rowid > (
select min(y.rowid)
from your_table y
where y.uk_column1 = x.uk_column1
and y.uk_column2 = x.uk_column2
and ...)
)
You can also try a UNION with itself --That eliminates duplicates.. Received on Fri Sep 05 2003 - 08:51:11 CDT
![]() |
![]() |