Ok, I see how it works.

Mark Murphy
STAR BASE Consulting, Inc.

-----rob@xxxxxxxxx wrote: -----
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
From: rob@xxxxxxxxx
Date: 10/06/2015 09:05AM
Subject: Re: Re: Using sql to delete duplicate records

I recreated it and used this technique and got the same results

delete from qtemp.dummy b
where rrn(b) >
(select min(rrn(a))
from qtemp.dummy a
where a.mychar = b.mychar
with nc
3 rows deleted from DUMMY in QTEMP.

select mychar, rrn(d)
from qtemp.dummy d
A 1
B 3
C 4
D 5

Rob Berendt

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].