> If you mean only ID's linked to all three (3) values?  Something like this 


Duh. Just noticed I left off the GROUP BY...

 
<cfset distinctValues = "A,B,C"> 
...

SELECT  ID, COUNT(Value) AS MatchCount
FROM     TableName
WHERE   
ID IN ( <cfqueryparam value="#distinctValues#" list="true" 
cfsqltype="cf_sql_varchar"> )
GROUP BY ID
 HAVING  COUNT(Value) = <cfqueryparam
 value="#listLen(distinctValues)#" cfsqltype="cf_sql_integer

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347721
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to