Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching for a substring in a field - fastest way
Message
De
09/03/2017 14:49:21
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
09/03/2017 14:30:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01648880
Message ID:
01648881
Vues:
79
>What is the fastest way to search through a file to find a substring within a field? I know you can
>
>set filter to 'xyz" $ yourfield
>go top
>
>or an SQL Select equivalent, but in a file where there are thousands of records, it takes a long time, specially on a network...
>
>Is there a quicker way?
>
>Many thanks!

Hi John

You can use LOCATE instead of GO TOP. That may give you a small boost. The best thing of all will be to use SQL to build a cursor. It will be faster to navigate the resulting cursor than moving through your completely non-rushmore-optimizable set filter. By that I mean yes, there are ways to rushmore optimize a filter, but not using $.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform