Home Forums SQL Server 7,2000 T-SQL Passing a List/Array Parameter to Procedure RE: Passing a List/Array Parameter to Procedure

  • SQL Server has no arrays or lists. You can try sending it as XML and then use Xquery to get the values that were sent. Another alternative is tor send it as in comma separated list and write and use your own function that can take such a string and return a table that that contains the values. A different approach is to use dynamic SQL with the parameter that you are sending. From those 3 approaches, the XML is my favorite.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/