View Single Post
Old 08-20-2008, 12:41 PM   #6 (permalink)
buggabill
The Contributor
 
buggabill's Avatar
 
Join Date: Jan 2008
Location: Maine, USA
Posts: 92
Thanks: 2
buggabill is on a distinguished road
Default

In MySQL you could write a query like the following:

sql Code:
SELECT fieldwithdupes, Count(fieldwithdupes) AS NumOccurances
FROM atable
WHERE fieldwithdupes
IN (SELECT fieldwithdupes
    FROM atable AS tmp
    GROUP BY fieldwithdupes
    HAVING COUNT(*)>1)
    GROUP BY fieldwithdupes;

This will get you a list of the `fieldwithdupes` in `atable` and the number of times that they are repeated. You could adapt this query to your needs.
__________________
-- Bill
"Why is it drug addicts and computer aficionados are both called users?" -Clifford Stoll
buggabill is offline  
Reply With Quote
The Following User Says Thank You to buggabill For This Useful Post:
eHobayyeb (08-21-2008)