Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strtran() in SQL where clause
Message
De
28/08/2002 09:18:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00694135
Message ID:
00694401
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Hello,
>
>I have an SQL query where I need to use strtran() in the where clause:
>WHERE STRTRAN(cname,' ','') = MyVar
>
>This slows down the process a lot!
>Is it possible to optimize this query? I have alrdady an index on STRTRAN(cname,' ',''), but this does not change the performance.
>
>Any help is highly appreciated!

An index on strtran(...) is virtually useless, since it is of variable length. Any decent VFP index has a fixed length. Perhaps padr(strtran(...)) will achieve better results.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform