On Thursday 26 Jun 2003 08:10 am, Brook Davies wrote: > Is there an easy way to select records that occur X number of times. So I > could select the records that have "San Fran" in the City fields only if > there are at least X number of records matching this criteria.
select PK,a,b,c from table where PK in (select PK from table where count(a) > X) -- Thomas C Advanced ColdFusion Programmer PLEASE NOTE: When the Recipient Is Not Directly Observing This E-mail, It May Cease to Exist or Will Exist Only in a Vague and Undetermined State. PLEASE ALSO NOTE: I don't speak for the company that sent this. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

