I am developing an ASP.NET application and passing a string value like \"1,2,3,4\" into a procedure to select those values which are IN (1,2,3,4) but its saying \"Conversion
You need to use SP_executesql to achieve this functionllity
CREATE Procedure [dbo].[sp_getUserRoles](
@pGroupIDs varchar(50)
)
As
BEGIN
EXECUTE sp_executesql
N'SELECT * FROM CheckList_Groups Where id in (@pGroupIDs)',
N'@level varchar(50)',
@level = @pGroupIDs;
End