No, it is not possible to do that except in the trivial case where you have just one entry in the comma-separated list.Within the stored proc, you should split the comma-separated string into a virtual table and join to that table. There are string splitter functions available - an especially good one is here in Fig. 21: http://www.sqlservercentral.com/articles/Tally+Table/72993/ Copy that function, run it to install it and use it like in the examples on that page.An alterative approach is to do something like the following:WHERE ','+@agelist+',' LIKE '%,'+CAST(age AS VARCHAR(8))+',%'
Splitting the comma-separated list is a better approach from a performance perspective. There are other ways of passing arrays to a stored procedure - see Sommarskog's article here: http://www.sommarskog.se/arrays-in-sql.html