>>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