Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best index expression?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01005870
Message ID:
01005972
Views:
19
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform