This is a good idea, but in my special case I do not want to maintain separate fields in the table. This search also applies to other fields that the user can search for.
>would add a field to the table and fill this with strtran(upper(cName))
>and create an index on that field.
>
>Peter
>
>
>>>>Hello,
>>>>
>>>>I'm using this SQL statement:
>>>>
SELECT * from Test WHERE CHRTRAN(cName,' ','') = "GAMMARES"
>>>>
>>>>The result will also give records like "GAMMA". However, "GAMMA" = "GAMMARES" returns .F. Why does the result include these records?
>>>>Thanks.
>>>
>>>Christian,
>>>
>>>It has to do with how Fox compares strings. The rules are;
>>>...
>>>The ONLY way to get an exact comparison of two strings is to use the ==, SET EXACT ON does not give an exact comparison.
>>
>>Jim,
>>Thanks for the explanation. But then I still do not understand why the query includes matches for "GAMMA" when looking for "GAMMARES".
>>The result must be, whether EXACT is on or off:
>>
>>"GAMMA" = "GAMMARES" = .F.
>>
>>I do not want to have an exact match in the cursor. This is not the purpose. But if searching for "GAMMARES" the matches should include:
>>"GAMMA RESEARCH"
>>"GAMMARESEARCH"
>>"GAMMA RES"
>>"GAMMARES"
>>
>>The query should exclude:
>>"GAMMA"
>>"GAMMARE"
>>
>>How can I then accomplish that?
Christian Isberner
Software Consultant