I'm looking to return rows from a table where a column is LIKE a keyword. This is my current code:
SELECT DISTINCT business_name FROM Table WHERE business_name LIKE @keyword + '%' ORDER BY business_name ASC
The problem with this is that if a business is called "The White Ship Inn", and the keyword to match is "White Ship" it will not match. If i put another wild card in front of @keyword then this finds too many matches - i need it to match against columns which either start with the keyword, or have a whitespace in front of them. Is there some kind of T-Sql i can use or will i have to go down the regex route (using this) ?