Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compound index with two integer fields
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00355330
Message ID:
00355334
Views:
21
How about leaving them #'s...
Index on field1+(field2*10000) tag whatever

make the multiplier bigger than your largest value you'd have in your field1 that will have the effect of "offsetting" the two #'s.
Index on f1+f2 tag whatever
if f1 is 1 and f2 is 4 "seek(5)" would work.. that's not a very good key.

but yes; str() would work too.
>What is the best way to create a compound index with integer fields?
>
>field1 is integer.
>field2 is integer.
>
>When I create an index like INDEX ON field1 + field2 TAG tagname1, foxpro seems to get "confused".
>
>Must I use the STR() function around field1 and field2?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform