i want to filter the rows using Stored procedure. below is my query
Create PROCEDURE [dbo].[Test]
@SearchTerm VARCHAR(100)
AS
BEGIN
Select * from master where name in (@SearchTerm)
END
In code behind,
cmd.Parameters.AddWithValue("@SearchTerm", "peter")
when i run with above parameter, it's work fine.
but when i pass like this cmd.Parameters.AddWithValue("@SearchTerm", "'peter','rahul'")
this time no rows fetching.
i tried manually then also it's not working.
exec Test ''peter','rahul''
Please help me, how to pass muliple string Using IN clause?