|
-
Sep 13th, 2012, 12:35 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] How to detect and list all records in a table that are duplicated.
I think that SQL can do this, but, despite searching the internet, I cannot find anything to solve this problem. All I found was checking for duplicates before the records are added.
Basically, if there are 2 identical records already existing in the database, I want to identify and list them (with the Key).
I think the SQL string is something along the lines of "SELECT pyID, pyStudent, pyClass, pyPaid FROM tblPay WHERE pyStudent, pyPaid, pyClass ARE THE SAME IN 2 OR MORE RECORDS AND COUNT(pyClass)>1" or something like that. Is it possible? I've been scratching my head for days on this!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|