SharkBait Posted October 20, 2006 Share Posted October 20, 2006 Is it possible to do a query to find out all the duplicates in a table?I need to change a field to a unique and if I do that and it finds some duplicates is just stops at the first duplicate.I need to get rid of the duplicates and there are roughly 176,000 records to go through :) Quote Link to comment Share on other sites More sharing options...
fenway Posted October 22, 2006 Share Posted October 22, 2006 Sure: SELECT yourField, COUNT(*) AS cnt FROM yourTable GROUP BY yourField HAVING cnt > 1 Quote Link to comment Share on other sites More sharing options...
SharkBait Posted October 23, 2006 Author Share Posted October 23, 2006 Cool, is there a way to delete the duplicate items without deleting all of it? Quote Link to comment Share on other sites More sharing options...
fenway Posted October 24, 2006 Share Posted October 24, 2006 All of what? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.