I currently have an SQL query that returns results based on the dynamic number of keywords passed.
I convert a list of keywords into a table and join it.
SELECT * FROM Table1
INNER JOIN
dbo.udf_List2Table(@Keywords, ',') ON (Field1 LIKE '%'+Keyword+'%')
This works fine, but returns all rows containing any keywords to be grouped. What I would like to do is return all rows containing all of the provided keywords.
I am sure you cannot do this using JOIN. Does anyone have any suggestions on how I can do this? I am trying to avoid dynamic SQL.
thank
Jamie source
share