Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching for a substring in a field - fastest way
Message
From
09/03/2017 14:49:21
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
09/03/2017 14:30:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01648880
Message ID:
01648881
Views:
80
>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 $.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform