Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Thanked 1 Time in 1 Post

    view duplicate entries

    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

  2. #2
    Regular Coder
    Join Date
    May 2004
    Thanked 0 Times in 0 Posts
    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;
    Carl McDade
    Hiveminds Magazine
    for web publisher and community builders
    eRuby Tutorials


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts