Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing on 2+ Integers
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00133766
Message ID:
00133781
Views:
8
>Hi All,
>
>Ok, I've got a link table that links two, two part primary keys, together. And sense Seek is faster than locate, I need to index on the four part key. How do you build an index on four integers?
>
>Thanks

Hi Samuel,

Concatenate the integers using BINTOC(). For example:
INDEX ON BINTOC(INTFLD1) + BINTOC(INTFLD2) + BINTOC(INTFLD3) +;
  BINTOC(INTFLD4)
* To seek
SEEK BINTOC(int1) + BINTOC(int2) + BINTOC(int3) + BINTOC(int4)
The index will be smaller, with less code. Take a look at the help file for some additional ideas.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform