I have the following SQL which returns 192 records:
SELECT Client.NoRegion,Client.CRC32,Client.FirstName,Client.LastName,COUNT(*)
FROM Client GROUP BYClient.NoRegion,Client.CRC32,Client.FirstName,Client.LastName HAVING COUNT(*) > 1
Note that the fields are fictive as those are not the real field names. So, lets just concentrate on the logic of the SQL.
This is from a 26 million record table. The result means that I have to remove 192 records.
Now, I need to find a way to easily run or adapt this SQL so it will remove those 192 records. What would be the best approach to take?
Note that the count is 2 for each 192 returned records. So, this is why I know that I have 192 records which need to be removed. This is the result of a bad process which happened a few years ago. We would like to clean them up from the table.