I'd like to create a stored procedure for a full-text search query using the "contains" function, with a generation term. It would look something like:
Using this, I could search the table for the word "apples" by calling search @string = 'Apples'. The problem is, it won't recognize the @string parameter in the contains statement - it's actually searching the table for "@string".
So, is there any good way to get a parameter into the generation term of the contains function?
Code:
CREATE PROCEDURE [search] @string varchar AS
select t.item FROM table t
where contains(t.info, ' FORMSOF (INFLECTIONAL, @string) ')
So, is there any good way to get a parameter into the generation term of the contains function?