Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with find Duplicat records

Status
Not open for further replies.

briansdell

IS-IT--Management
Dec 11, 2003
40
0
0
US
Help I have a table that contains 50700 records, one of the fieds (Folder ID)contains a duplicat record that is preventing me from setting that field to not except any duplicates. Can someone tell me is there a way to search the field for any 2 or more records that match? The problem I have is I don't know what files they are so I don't have anything to base the search on. I was hoping that I could enter some sort of wild card that would compare the files and report those that match.

Thanks

Brian
 
Something like this ?
SELECT [Folder ID], Count(*)
FROM theTable
GROUP BY [Folder ID]
HAVING Count(*)>1

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks but not sure I under stand do you run this from a Querie for from some other place.

Thanks

Brian
 
Copy the above SQL instruction and paste in the SQL view pane of a query window.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
sorry I should have told you I am not use SQL this likely explains why I can't find the view pane.
Any other Ideas??

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top