Something like...

SELECT
              ID
FROM
              MyTable
WHERE
              value IN (<cfqueryparam cfsqltype="cf_sql_varchar"
value="#myList#" list="true" />)
;

??

On Mon, Sep 26, 2011 at 12:18 PM, Richard White <rich...@j7is.co.uk> wrote:

>
> Hi,
>
> i know this is probably a simple answer and i probably drunk too much
> coffee!
>
> given the following sql data:
>
> ID  value
> --------
> 1   A
> 1   B
> 1   C
> 2   A
> 2   B
> 3   A
> 3   B
> 3   C
>
> i need to run a query that says return me the ids that are linked to values
> A and B and C.
> so this query on the above data would return IDs 1 and 3
>
> thanks :)
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:347713
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to