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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ID Double Records

Status
Not open for further replies.

ITbeast

IS-IT--Management
Jul 25, 2006
67
US
Can someone think of a quick query that I could use to identify when a value shows up more than once in a table? The aren't necessarily duplicates, I'm just interested in one field that that value shows up more than one. I realize that I could sort the column and view them that way, but I want a nice looking list of them.
 
SELECT YourTable.YourField, Count(YourTable.YourField) AS CountOfField
FROM YourTable
GROUP BY YourTable.YourField
HAVING (((Count(YourTable.YourField))>1));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top