List:General Discussion« Previous MessageNext Message »
From:Jeremy Cole Date:April 5 2005 2:23pm
Subject:Re: Duplicated records
View as plain text  
Hi Scott,

> Here is my novice question:
> I need to find duplicates in "Batch" category when I issued this query:
> 
> SELECT * FROM QA WHERE Batch=439584414;
> 
> Result:
> 90577
> 1	2661	5334	JulieAnt	25	5	5	439584414	2004-10-03 00:00:00	2004-10-03
> 00:00:00	0	90575
> 1	5657	5334	JulieAnt	25	5	5	439584414	2004-10-03 00:00:00	2004-10-03 00:00:00	0	
> 
> How do I issue a query that finds duplicated Batch number?

SELECT Batch, COUNT(*) as Nr
FROM QA
GROUP BY Batch
HAVING Nr > 1

Regards,

Jeremy

-- 
Jeremy Cole (currently in Bangalore)
Technical Yahoo - MySQL (Database) Geek
Thread
Duplicated recordsScott Hamm5 Apr
  • Re: Duplicated recordsJeremy Cole5 Apr
  • Re: Duplicated recordsRhino5 Apr
    • Re: Duplicated recordsScott Hamm5 Apr
      • Re: Duplicated recordsPeter Brawley5 Apr
  • Re: Duplicated recordsRhino5 Apr
    • Re: Duplicated recordsScott Hamm5 Apr
  • Re: Duplicated recordsRhino5 Apr