Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the best index expression?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01005870
Message ID:
01005972
Vues:
18
>Hi everybody,
>
>If I want to filter all non-empty values for character (100) field, what would be the best expression for the index (if I need the index)?
>
>Thanks in advance.

Probably my brain is not functioning correctly today, something that is very bad given the poor condition it normally is, but, if you already have an index on the field, let's call it cField, you can just do:
lcSpaces = Space(Len(cField))
scan for cField > lcSpaces
   ...
endscan
or
locate for cField > lcSpaces
scan rest
endscan
The > operator is rushmore optimizable, so it should be OK
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform