Here is the problem I have full text search extension want to use contains method but the problem is that in stored procedure I have variable which comes from outside and I want this variable to have this (") from start to end and before the last (") I want it to have this (*
). What can I do for it ? Is there a way to put variable inside the braces? If not is there any other way ? I am using adonet also I thought about this that lets make it come from c# like this ["[@Text]*"] but I could not find a way to put brace inside of string.
ALTER procedure [dbo].[SelectUsers_SP]
@Text nvarchar(50) = null
as
begin
if (@Text is not null)
begin
select * from Users where contains(*, '"[@Text]*"') and IsDeleted = 0
end
select *
from Users
where IsDeleted = 0
return 0;
end
c#
_service.Select($"'"{text}*"'")