Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Marking second (and subsequent) duplicates
Hi,
I just figured this out last week. From the top of my head, it was something like this.
delete
from emp a
where exists
( select 1
from emp b
where a.empno = b.empno
and a.rowid > b.rowid
)
Regards, Gerrit-Jan Linker
Developer of Oraxcel and OraDebug
http://members.aol.com/gjlinker
>PROBLEM:
>Data contains duplicate values on ACCOUNT_NO. Want to leave one copy in
>place
>and mark 2nd and any subsequent duplicates as errors.
>
>Does anyone know a tricky way to do this besides writing a cursor loop to
>compare the values (how 3GL of me)?
Received on Sat Jan 30 1999 - 18:36:40 CST