it's possible to pass a Where statement through declared variable in SQL Server 2008?, How can I do something like this?
declare @foo as nvarchar(max) = '9510,9580,5030'
SELECT T1.[ItemCode]
FROM tbl1 T1
WHERE T1.ItemCode in (@foo)
When I run this code my foo variable can hold at least one item or 100 items, that depends on another result