There’s a stored procedure I’m studying. Would this be a possible call? –
exec [dbo].[prc_RPT_Respondent_Answer] '20121011', '20121017' , 18964 , "3", "30,31,32,33,34,35,36,37,38,39,130"
I’m guessing the "30,31,32,33,34,35,36,37,38,39,130" argument is handled by code like the following(which is from the referenced sproc:
BEGIN
INSERT
INTO #tempClientLK_ResponseStatuses
SELECT CONVERT(INT, val) FROM dbo.Split(@ClientResponseRange, ',')
END
Yes, this should work. I already have used this approach, few times.
If you are asking about how to write that table valued function dbo.Split() then you may check this link-
http://blog.logiclabz.com/sql-server/split-function-in-sql-server-to-break-comma-separated-strings-into-table.aspx