On Wed, Mar 14, 2001 at 03:48:28PM -0900, Josh Burroughs wrote:
> We recently moved our hardware inventory database off of access (yay!)
> over to mysql. During it's days as an access database it aquired a
> numbered of duplicate entries. In every case (or at least the ones I'm
> working on) the serial numbers will be the same but likely all other info
> will be slightly different. One of the records will be basically correct
> and current, the other faulty. I want to be able to find every case in the
> database where more than one record shares the same serial number (which
> is not at present a key feild, but will be once the dupes are removed) so
> we can look at the records and determine which ones are valid and which
> ones need to go. Is there a way to this?

Try


select id, count(*) as mycnt from usedtobeaccesstable group by id having
mycnt>1 order by mycnt;


-- 
                                The Moon is Waning Gibbous (69% of Full)
                                                  nieuw.nl - 2dehands.nl

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to