Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another SQL question
Message
De
28/08/2002 15:23:39
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00694233
Message ID:
00694618
Vues:
14
This message has been marked as a message which has helped to the initial question of the thread.
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?
Peter Cortiel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform