Larry,
I moved to CONTAINS because I had instances where the desired search did not
start at the beginning of the column.
For example if I used LIKE and was searching for "ABC corp" then
"My ABC company" would not be found.
For instance, my database has 3 companies with ABC in their name
ABC Tool & Die
ABC RAIL (AMER.SYSTEMS TECH) O.O.B.
LABCOR VENTES TECHNIQUES
If I search WHERE CompanyName CONTAINS 'ABC', it returns all 3 companies.
If I search WHERE CompanyName LIKE '%ABC%', it returns all 3 companies.
If I search WHERE CompanyName LIKE 'ABC', no rows are found.
If I search WHERE CompanyName LIKE '%ABC', no rows are found.
If I search WHERE CompanyName LIKE 'ABC%', then
ABC Tool & Die
ABC RAIL (AMER.SYSTEMS TECH) O.O.B.
are found.
So CONTAINS always seemed to give me the results I wanted without having to
play around
with wildcards.
Perhaps I am not fully understanding (which is quite likely, it is Friday).
Jan
-----Original Message-----
From: Lawrence Lustig <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Fri, 12 Feb 2010 11:32:53 -0800 (PST)
Subject: [RBASE-L] - Re: ON KEY PRESS
<<
That being said
it looks like I could use something like %LIKE% to accomplish
the same.
>>
This will follow the same optimization rules as CONTAINS. If you have a
wildcard at the beginning of the matching term then the search cannot be
optimized. LIKE can be optimized if the wildcard occurs elsewhere in the
matching string.
--
Larry