...

View Full Version : view duplicate entries



boeing747fp
06-03-2004, 10:33 PM
is there a way to view duplicate entries? i have like 500 entries into a database already and i need to check for if someone entered more than one entry for each college... and i dont feel like checking every single entry... so i need to create a query/script that checks the database for duplicate results in college ID tags 0-780.... is this possible? i have a field in the table im talking about called college_id which relates to other tables with info in them (that part works) and this field is what will tell me if there are duplicate entries (like if there are more than 1 entries for college_id 256, i want it to show up in this result page so i can delete one of them)

any help is appreciated

carl_mcdade
06-03-2004, 11:09 PM
Don't know much MySQL but a search for Having Count(), the typical way of doing this, produced this:


mysql> SELECT COUNT(*) AS repetitions, last_name, first_name
-> FROM cat_mailing
-> GROUP BY last_name, first_name
-> HAVING repetitions > 1;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum