I wants to separate string by comma. Actually I wants to filter in WHERE
Clause like
CREATE PROC spGetRecords
@class varchar(50)
AS
BEGIN
SELECT *
FROM SampleTable
WHERE class in (@class) --in Database class is an integer
END
So, I want to pass the parameter when execute query like below
spGetRecords @class = '12,22,45,66'
I think it's not possible to pass multiple value in single parameter in my case.
So, If I remove separate the string by ','
then I can run my query in while loop that will bring the record correct?
So, How can I separate the string by comma