>I have a table that collects multi-user inputs for processing. Sometimes the processing isn't as fast as the user thinks it should be and submitts the request again. This causes the process problems. Before the process starts how can I go through the table and clean out any first duplicate entries?
The following statement can check for duplicates. Let's assume the table has a PK field called MyPK.
select MyPK, count(*) as HowOften;
from MyTable;
group by MyPK;
having HowOften > 1;
into cursor Temp
From there, you would have to decide which of the duplicates to delete. There are several ways to solve this. For instance, you could write a program that goes to the table for each MyPK, does a SEEK, SKIPs to the next record, and then deletes while the MyPK field doesn't change.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)