I need to run a full text search over a table from within a stored procedure. There are a couple of things I need to take into account:
- Unknown amount of search words, this depends on user input
- The table we are searching can change (depending on what we are searching for)
Currently I am using a query that results in this:
SELECT *
FROM Table
INNER JOIN CONTAINSTABLE(Table,*,'"searchword*" AND "secondsearchword*"') s ON s.[Key] = Table.[Key]
However the 'contains_search_condition' is performed for each column individually. What I need is to get the rows where all search words are contained within any column. How do I do this? Is the only option the use of computed columns/Views or is there another solution?