BoggyBayouBoy
asked on
SQL Server - passing a string paramether to a Stored Proc
I pass a string as a parameter to a stored procedure that should get results but does not.. My SP looks like this
ALTER PROCEDURE [dbo].[spMySP]
@items nvarchar(50)
AS
SELECT dayofWeek, anotherItem
FROM table1
where cast(month(dayofWeek) as nvarchar(20)) in (@items)
END
I get no results regardless of what I pass as a parameter. For example if i pass '1,2,3' as a parameter, i get nothing. What the heck have i done wrong?
ALTER PROCEDURE [dbo].[spMySP]
@items nvarchar(50)
AS
SELECT dayofWeek, anotherItem
FROM table1
where cast(month(dayofWeek) as nvarchar(20)) in (@items)
END
I get no results regardless of what I pass as a parameter. For example if i pass '1,2,3' as a parameter, i get nothing. What the heck have i done wrong?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER