>>>>What about m.lo1 = "ma " and person.first should include "Mary", "Grandma", "Whatcamacallit", etc? What ALLTRIM the FIELD?
>>
>>>Then ALLTRIM() both expressions...
UPPER(ALLTRIM(ex1)) $ UPPER(ALLTRIM(ex2))
>>
>>I am still not getting it. Why ALLTRIM the field? The ALLTRIM in the memory variable makes the "ma " into "ma" and then the $ search for anywhere in the field that contains the "ma" (as well the UPPER is needed, but the key issue is why ALLTRIM on BOTH sides).
>>
>>Chuck
>
>Same exact reason. Trailing spaces.
>The field value, unless it takes up the full size of the field contains trailing spaces just like the variable.
>e.g.
>Create Cursor cuTmp (cfield c(10))
>Insert Into cutmp Values ("This")
>Insert Into cutmp Values ("That")
>Insert Into cutmp Values ("Th")
>lcValue = "Those"
>Browse For cfield $ lcValue
>Browse For Alltrim(cfield) $ lcValue
>? ["] + cfield + ["]
notice that the last line returns
"Th "
which is not in
"Th"
Just to throw another option at you:
BROWSE FOR ATC(ALLTRIM(m.lo1),first)>0
or
SELECT * FROM person WHERE ATC(ALLTRIM(m.lo1),first)>0