Mar 20, 2007 #1 smithcza Programmer Joined Jan 7, 2005 Messages 80 Location ZA Hi all How can I find if I have duplicate records in a table? Regards, SmithcZA
Mar 20, 2007 #2 AlexCuse Programmer Joined Apr 13, 2006 Messages 5,416 Location US something like this would identify them. If you want to delete them, there needs to be a way to tell which rows you want to keep. Code: select [UniqueColumn] , count([UniqueColumn]) from YourTable group by [UniqueColumn] having count([UniqueColumn]) > 1 Hope this helps, Alex Ignorance of certain subjects is a great part of wisdom Upvote 0 Downvote
something like this would identify them. If you want to delete them, there needs to be a way to tell which rows you want to keep. Code: select [UniqueColumn] , count([UniqueColumn]) from YourTable group by [UniqueColumn] having count([UniqueColumn]) > 1 Hope this helps, Alex Ignorance of certain subjects is a great part of wisdom