- see footer for list info -<
You can use dynamic SQL or create a temporary table dynamically and then join on it!
On 12/6/06, Jolly Green Giant <[EMAIL PROTECTED]> wrote:
>- see footer for list info -< Ah yes. Thank you, Adrian. After I posted, I copied my subject line into google and got some hits. I googled for it before posting, but just wasn't typing in what was needed to get results. found that lots of folks have had to deal with this issue. Doesn't look like there's a clean way to fix it. I'm just going to do multiple calls, since my lists are going to be short. On 12/6/06, Adrian Lynch <[EMAIL PROTECTED]> wrote: > >- 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 -< > _______________________________________________ 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 -<
-- Simon Baynes www.simonbaynes.com _______________________________________________ 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 -<
