I need something between full text search and index search:
I want to search for text in one column of my table (there will probably be an index in the column, if that matters).
The problem is that I want to search for words in a column, but I do not want to combine the details.
For example, my column may contain company names:
Mighty Muck Miller and Partners Inc.
Boy and butter for breakfast
Now, if I search for “Miller”, I want to find the first line. But if I search for “colder,” I don’t want to find it, because there is no word starting with “iller”. A search for “Break” should find the company “Boy and Butter for Breakfast,” though since one word begins with “Break.”
So, if I try to use
WHERE BusinessName LIKE %Break%
he will find too many hits.
Is there a way to search for words separated by spaces or other delimiters ?
(LINQ will be better, plain SQL will do too)
Important: Spaces are far from the only delimiters! To do this, consider hyphens, colons, periods, all non-alphanumeric characters!
source share