Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicates are known and now to delete them
Message
From
24/04/2012 17:20:31
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Duplicates are known and now to delete them
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01542530
Message ID:
01542530
Views:
78
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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform