locked
Handle array in stored procedure RRS feed

  • Question

  • User1510859543 posted

    We have an asp.net web form that we want to pass the results of 1 or more selections from a ListBox to a stored procedure.  I have the code to loop through the listbox and select the values of each selected item but now we need to pass it to a stored procedure that will split the results in the WHERE clause, e.g. WHERE EmployeeCode IN(array).

    Thursday, December 20, 2018 2:42 PM

Answers

  • User632428103 posted

    Hello all,

    @dlChase -> in a project i have done this , pass a long string with comma separated

    split all, insert the result into temporary table

    and finish by a select where field in (select field from the temp table)

    For to split the parameter who is pass into your store procedure, there is a split function on google you can find the code easy.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 20, 2018 3:19 PM

All replies