Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seeking for more than one expression...
Message
 
 
To
18/06/1999 12:41:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00231466
Message ID:
00231533
Views:
19
John,
Thanks a million!! Putting the state before the city like that did the trick, sometimes you just don't think of the more obvious things...:D

>Hi John,
>
>Compound tag expressions require that you standardize the size of each component of the expression. You should start the expression in grouping order. This allows flexibility. In your example, you might index UPPER(PADR(ALLT(state),2)+PADR(ALLT(city),30)). The padding places spaces out to the maximum possible length of the field and allows for blank values. The UPPER normalizes variances in how the data is stored.
>
>Now, lets say you have two US cities and a foreign city with no state or province. The index is in the following order:
>  LAGOS
>ALMONTGOMERY
>FLMIAMI
>FLORLANDO
>FLTALLAHASSEE
>
>So, you want to find Orlando, FL? cState="FL" and cCity="Orlando" and the SEEK expression is almost the same as the tag UPPER(PADR(ALLT(cState),2)+PADR(ALLT(cCity),30)). This is fully Rushmore optimized because the seek matches the index tag expression. You can also do something like SELECT * FROM table WHERE state="FL and get a cursor of all cities in FL and this is also optimized.
>
Previous
Reply
Map
View

Click here to load this message in the networking platform