My stored procedure has the following code:
WHERE tag IN (@InValue)
I want to send a list of tags as an input parameter
EXEC dbo.TestSelect @InValue = '''Test1'',''Test2'',''Test3'''
am I close?
My stored procedure has the following code:
WHERE tag IN (@InValue)
I want to send a list of tags as an input parameter
EXEC dbo.TestSelect @InValue = '''Test1'',''Test2'',''Test3'''
am I close?
I suggest taking a look at table valued parameters - these have been introduced in SQL Server 2008.
Table-valued parameters are a new parameter type in SQL Server 2008. Table-valued parameters are declared by using user-defined table types. You can use table-valued parameters to send multiple rows of data to a Transact-SQL statement or a routine, such as a stored procedure or function, without creating a temporary table or many parameters.