Questin about using IN

Questin about using IN

Post by rayd » Sun, 04 Apr 2004 01:05:10


http://www.yqcomputer.com/ ~sommar/arrays-in-sql.html

Great article on using arrays in stored procedures.
This should get you started.



because
path.
 
 
 

Questin about using IN

Post by V. Hensken » Sun, 04 Apr 2004 01:07:27

Hi,

I'm working on a stored procedure with a SELECT instruction, like:

SELECT ID FROM tblObjects WHERE (UserID IN (1, 3, 6, 10));

I want to set the values in the list (1, 3, 6 , 10) by one inputparameter
and I'm thinking of using a string, like "1, 3, 6, 10".

My question is:
How to "convert" this string to the list?

SELECT ID FROM tblObjects WHERE (UserID IN (@sFilter)) doesn't work because
the datatypes are not the same.

Maybe I'm on the wrong way and hopefully someone can get to the right path.
Thanks,

Victor

 
 
 

Questin about using IN

Post by V. Hensken » Sun, 04 Apr 2004 15:33:38

Thanks, this is what I need!


"Raymond D'Anjou (raydan)" < XXXX@XXXXX.COM > schreef in bericht



inputparameter