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: Marking second (and subsequent) duplicates

Re: Marking second (and subsequent) duplicates

From: Gjlinker <gjlinker_at_aol.com>
Date: 31 Jan 1999 00:36:40 GMT
Message-ID: <19990130193640.25773.00000811@ngol01.aol.com>

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

Original text of this message

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