Subject Fuzzy match on business name
Author lcampbell
Here's one I hope others have encountered (and possibly found an elegant
solution).
I have a table of constituents (which may be people or businesses)
containing the field 'business_name'; and have user input that may have
fat-fingered the search string (e.g., 'Corlis Estates' instead of
'Corliss Estates'). When they do, I try to present the user with a list
of potential matches. So far, I'm doing it with a single query that
contains, as a part of the WHERE clause:
"where Upper(business_name) like '%'||:st1||'%' or lUpper(ast_name) like
'%'||:st2||'%' " were my parameters are the whole business name and a
constituent's last name (in uppercase). It works well for individuals,
but fails to catch my 'Corlis Estates' example above. Yes, I could break
the incoming business name string into individual words, eliminate the
common "The, A, An, The, Inc,..." and submit individual words in a chain
of "or"s. Has anybody got a better way?

Lane C.
NW Software