I am new to MySQL but have used Access for many years in developing the intranet. I recently started using the MySQL database and pulled my hair out. The LIKE command gives erratic or no results for entries that exist.
A table called Customers that contains the Business Name column. One such entry is, for example, "FRED SMITH CONSTRUCTIONS".
Select * from Clients where BusinessName LIKE '%FRED%'
Its pretty messy and it makes no sense to me. No more than 1 word, and this is a seam to get confused. Its as a wildcard% does not work between words, or if the second word has more than one character.
To save me from troubles, I search for each word separately, but it shows too many results. eg,
Select * from Clients where BusinessName LIKE '%FRED%' or BusinessName LIKE '%SMITH%'
returns true.
Any suggestions? Column Type - Text. Tried RLIKE
with similar results.
source share