Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index on 3 fields at once
Message
From
02/03/1999 08:19:25
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00192740
Message ID:
00193080
Views:
18
Hi Rebecca,

>I have tried to use the index command and it works fine
>on one field, however, I am trying to index 3 at once.

So longs as the three fields are comparable types, you can index all three of them via:

INDEX ON first+second+third TAG IndexName

concatenating the field names in the order of importance. If the fields are not of comparable types, you will need to use conversion functions in your concatenation.

For example, if first and third is characterm but second is a numeric, you could use:

INDEX ON first+ALLTRIM(STR(second))+third TAG IndexName

Setting the order of the record set to this index tag will order the records by first, second, and then third.

HTH,
Phil
Phil
_____________________________
Phil Miles
http://www.philmiles.com
phil@philmiles.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform