select count (*), id from table
group by id
having count (*) > 1

should do what you want.


Regards,

Alan Ford


  ----- Original Message -----
  From: Wurst, Keith D.
  To: CF-Talk
  Sent: Tuesday, August 19, 2003 3:10 PM
  Subject: sql question


  i would like to write a sql query that can find where a certain 'id' has a
  duplicate. i don't want to see the ids where there is only one instance of
  it. (for example, show me 20010001 if there are 2 of them in the db, and
  don't show me 20010002 if there is only one of them in the db). anyone
have
  any suggestions? thanks.

  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to