>- see footer for list info -<
There's code out there for a UDF in SQL(I've only used an MSSQL one, what DB
are you working with?). It takes a list and returns a table. So you can use
it like:

SELECT *
FROM MyTable
WHERE MyID IN (MyUDF(@MyString))

I did have the code but someone(hmmmm) has moved it!

Adrian

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jolly Green
Giant
Sent: 06 December 2006 22:37
To: List - CF Dev
Subject: [CF-Dev] SQL IN() Clause for integers in a Stored Proc


>- see footer for list info -<
I thought there was a SQL list, but I couldn't find it.  I'm in a
hurry, so I'd love it if someone could help.

I'm in a Stored Proc on MS SQL 2000 and I'm in the WHERE clause,
trying to see if a column matches a list of integers.

Something like:

WHERE mycolname IN (@listOfIntegers)

But that doesn't fly because my list of ints has to be a string.

I tried...

WHERE cast(fk_ActionID as varchar(40)) IN (@actionIDList)

and that worked, but only if my @actionIDList only had one list member.
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to