Use the LIKE function when a user searches.
SELECT FROM MyBooks WHERE Title LIKE %Chateau%
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
Let me add an idea. If you are going to use "LIKE" then you need to decide what things are wild cards (all vowels?). There may be a better way:
A really helpful search technique would look for homophone matches as well as more accurate spellings . Soundex is an English-based system which might be helpful. I might suggest a secondary table containing columns `sounds_like` and a primary key into the main table. Multiple word titles, of course would have multiple rows in that table; and the lookup could not be done (easily) entirely in SQL.
griswolf
Veteran Poster
1,165 posts since Apr 2010
Reputation Points: 344
Solved Threads: 256