Brandon writes "I would like to pass a variable into a stored procedure that will be used in an IN clause array.Simplified Example:
I want to pass to the following stored procedure:
spTest 'CA,UT'
The stored procedure looks something like the following:
CREATE PROCEDURE spTest(@States varchar(1000)=null)AS
SELECT * FROM Cities where StateID IN (@States)
I'm not sure if my syntax is wrong (i.e. '''CA'',''UT'''), but I sure can't seem to get it to work.
What am I missing?
SQL Server 2000, Windows 2000 SP2"