jlsmithhartfiel
Programmer
Hi! Would normally search for this...
I have a stored procedure where one of the parameters is used in an IN clause. I want to pass a comma delimited list to the sp. Like:
It seems this cannot be done. What I'm looking for is the most time efficient alternative.
Thanks in advance! Jessica![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)
I have a stored procedure where one of the parameters is used in an IN clause. I want to pass a comma delimited list to the sp. Like:
Code:
exec sp_test "'val1','val2','val3'"
CREATE PROCEDURE sp_test
@proptype varchar(100)as
select p.uid,
from prp p
where (@proptype is null
or (@proptype is not null
and p.proptype in (@proptype)))
It seems this cannot be done. What I'm looking for is the most time efficient alternative.
Thanks in advance! Jessica
![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)