TrouperG
Newbie
Points: 5
More actions
April 19, 2002 at 8:06 am
#78302
I know there has to be a way to pass a column delimited string as a variable in a Stored Procedure. Maybe I'm just lazy for posting this in a forum but can somebody help.
Trouper A. Green
Eve
SSCrazy
Points: 2480
April 19, 2002 at 9:32 am
#427499
What are you trying to do - pass a delimited string of parameters and then process each as separate parameter or include in a search like
select smth from tbl
where col in (@mydelimitedstring)
Steve Jones - SSC Editor
SSC Guru
Points: 735912
April 19, 2002 at 9:56 am
#427504
You just pass it in as a varchar.
create procedure MyPRoc
@MyParam varchar(100)
as
select @MyParam
return
go
declare @C varchar( 100)
select @C = '1,2,3,4,5'
exec MyPRoc @C
Steve Jones
steve@dkranch.net
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply