Multiple SQL Parameter Values

What options are available in SQL 2005 for passing multiple values ​​to store procedures

Pseudo codes

In c # code

    List<string> myApplicationList;
    .... (code to assign values)
    **Construct parameter list**
    Call stored procedure [spSelectMaster] with myApplicationList

SQL stored procedure

    CREATE PROCEDURE [Ecn].[spSelectMaster]
        **Need to declare parameter here but not sure what this would be**
    AS
    BEGIN
        SET NOCOUNT ON
        SELECT *
        FROM [dbo].[Master]
        WHERE [Master].[ApplicationKey] IN (@ApplicationList)
    END
    GO

Thanks in advance

+1
source share
1 answer

There is no native array support in SQL Server 2005 T-SQL, but you can work around this:

Arrays and Lists in SQL Server 2005

How do I pass a list of values ​​or an array to a SQL Server stored procedure?

+4
source

Source: https://habr.com/ru/post/1791593/