Re: removing duplicate records
Posted in 1993
a two step approach to removing the duplicates:
select col1,col2,min(rowid) min_rowid
from t1
group by col1,col2
having count(*) > 1
into temp temp1;
delete from t1
where rowid in
(select min_rowid from temp1);
regards,
------------------------------------------------------------------------------
| . .
Bob Baskett | ... ...
Software Engineer, DBA | ..... .....
Business Systems Integration Group | .. ... ..
Semiconductor Products Sector | . . .
Mesa, AZ |
| Motorola, Inc
------------------------------------------------------------------------------
Sun 690-MP
Informix Versions:
Online - 5.00.UC2
ISQL - 4.10.UD1
4GL-RDS- 4.10.UC1
------------------------------------------------------------------------------