Subject | Duplicate record deletion |
---|---|
Author | Ian A. Newby |
Post date | 2005-06-20T12:35:08Z |
Hi Folks,
I think a while back on this list that someone suggested using the
dbkey to delete duplicate records. So I thought I would give it a try
the subselect in the following statement returns 3008 records out of
the total of 3068. However the full statement does nothing.
delete from ppm_mappings m2
where m2.rdb$db_key not in
(select min(m1.rdb$db_key) from ppm_mappings m1
group by m1.matrix_id, m1.product_id, m1.process_id)
Am I barking up the wrong tree?
Regards
Ian Newby
I think a while back on this list that someone suggested using the
dbkey to delete duplicate records. So I thought I would give it a try
the subselect in the following statement returns 3008 records out of
the total of 3068. However the full statement does nothing.
delete from ppm_mappings m2
where m2.rdb$db_key not in
(select min(m1.rdb$db_key) from ppm_mappings m1
group by m1.matrix_id, m1.product_id, m1.process_id)
Am I barking up the wrong tree?
Regards
Ian Newby