I would like to run a search with MSSQL Full text engine where given the following user input: ‘Hollywood square’
I want the results to have both Hollywood and square[s] in them.
I can create a method on the web server (C#, ASP.NET) to dynamically produce a sql statement like this:
SELECT TITLE FROM MOVIES WHERE CONTAINS(TITLE,''hollywood*'') AND CONTAINS(TITLE, ''square*'')
Easy enough. HOWEVER, I would like this in a stored procedure for added speed benefit and security for adding parameters.
Can I have my cake and eat it too?
I agreed with above, look into AND clauses
However you shouldn’t have to split the input sentences, you can use variable
by the way search for the exact term (contains) search for any term in the phrase (freetext)