Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seeking for more than one expression...
Message
From
18/06/1999 12:41:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00231466
Message ID:
00231478
Views:
17
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.


>Ok, I know that isn't possible(or is it?) but my LOCATE statements are VERY sloooow, and I'd love to just be able to seek for more than one expression, like city AND state, coming to the the closest matching record....is this possible? Any thoughts?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform