forecasting
Programmer
- May 2, 2002
- 130
I am trying to write a stored procedure where I can pass in the criteria as a single string. For example,
DECLARE @INclause nvarchar(20)
SET @INclause = '''WA'',''CA'''
SELECT City, State
FROM Atlas
WHERE State IN (@INclause)
SQL does not interpret the @INclause as two criteria. Does anybody know how to do this?
DECLARE @INclause nvarchar(20)
SET @INclause = '''WA'',''CA'''
SELECT City, State
FROM Atlas
WHERE State IN (@INclause)
SQL does not interpret the @INclause as two criteria. Does anybody know how to do this?