[Update: Using SQL Server 2005]
Hi, what I want to do is query my stored procedure with a comma-delimited list of values (ids) to retrieve rows of data.
The problem I am receiving is a conversion error:
Conversion failed when converting the varchar value ' +
@PassedInIDs + ' to data type int.
The statement in my where-clause and error is:
...
AND (database.ID IN (' + @PassedInIDs + '))
Note: database.ID is of int type.
I was following the article at:
http://www.sql-server-helper.com/functions/comma-delimited-to-table.aspx
but did not complete because of the error.
In my execution script I have:
...
@PassedInIDs= '1,5'
Am I doing something wrong here? Thank you for your help.