Some time ago every record in one of my tables got duplicated (the primary keys had been disabled for some reason - so these duplicates were allowed). I did a select distinct * in order to remove the duplicates, but now the primary key (a compound key on three fields) will still not enable due to it being violated. How can I find out which record(s) would violate the primary key I'm trying to enable. I tried the following but to no avail:

select STAT_TIMESTAMP, STAT_DTO_ID, STAT_ID
from STATS
minus
select distinct STAT_TIMESTAMP, STAT_DTO_ID, STAT_ID
from STATS;

This returns no rows, suggesting to me either the code isn't doing what I expect it to do (i.e. return none distinct primary keys values) or that there is nothing that would violate the primary key!

Thanks for any light you can shed on this problem,

Matt