Pass in Dynamic number of parameters to a stored procedure
- by xrum
Hi,
I have a function in my .NET application, that needs to do a search of an unknown number of parameters.
for example: select * from tbl where x=1 or x=2 or x=3 or x=4
is it possible to do in .NEt and SQL? how do i go about creating dynamic parameters in .NET (I was thinking doing it with a loop) but then how do i declare them in my stored procedure? does sql have arrays?
please help.
thank you!