Unfortunately not. You will have to use a cursor or look carefully at what you want to do. Cursors are not recommended. Where are you getting the data for your array? Post an example of what you want to achieve.
Basically I have a form on a page with a multiple select element where the user can choose any number of countries to search on.
so when I get to the results page I have a variable
countryID = "1,3,65"
From there I need to construct annother variable looking Like:
temp = "Partners.countryID=1 OR Partners.countryID=3 OR Partners.countryID=65"
so I can then insert it into an SQL statement. At the moment I am constructing the string on an ASP page and passing it to the stored procedure which is not ideal, and I now need to be able to do it all in the stored procedure!!
See thread183-483640 and faq183-3132. If you want to get the best answer for your question read faq183-874 and thread183-468158. Terry L. Broadbent - DBA
SQL Server Page:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.