I have a table that I need to identify duplicate entries based off the value of a single column, and delete all but one of the duplicate entry records.
Was hoping someone had a routine already for something like this. I found this example, but it doesn't work, gives error on the where (patientID,mpinumber) line:
delete from patients
where (PatientID, mpinumber)
not in
( select min(PatientID), mpinumber
from patients group by mpinumber)
Thanks
Kirk