Re: sql-question
Posted in 1999
FProse — — source: Informix-list mailing list archive (1991-1998)
Can we assume that there is someting that would differentiate one
record from another?
To determine what values are duplicate you could doe something like:
select *
from client
where client.ssn in (select ssn from client as tmp
group by ssn having count(*) > 2)
order by ssn;
You could use a variation on this to unload and or delete the records
that are duplcate. Others have suggested doing some form of manual
delete using 'vi' and then load the remainder back up.
If there records are truely duplicates (ie, same record, stored twice)
you could use the above sql but add DISTINCT for the unload, do the
delete, and then do the insert from the .unl file.