Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BINTOC() ¿Works in index?
Message
From
13/07/1998 03:07:04
 
 
To
10/07/1998 16:51:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00115812
Message ID:
00116698
Views:
17
>>I've read in VFP documentation that bintoc function may be used to reduce size of indexes. I've tested without success: bintoc(1) returns the same string than bintoc(2), 3, 4 etc. So how can be used to order records?
>>What i'm forgeting?
>>Thanks
>
>It creates a four-byte string which can be concatenated with others. It probably makes indexes much shorter than when you use numeric indexes; though, it ignores the decimal part, but then - a numeric index rarely has one, does it?
>
>The real gain is when you have had an index on two numeric fields, like
> inde on str(numfield1)+str(numfield2)
>if these fields had some decimals or length of 6 or more digits, the resulting key length would be 12 or more bytes.
> inde on bintoc(numfield1)+bintoc(numfield2)
>will surely be 8 bytes long, and be as quick as an index on integer.

Ok. Thanks Dragan. But i've checked (tahnks to George) that bintoc() indexes doesn't works with 'general' sequence. Only with 'machine' sequence, and this one is not good for me cause has case sensitivity. I know i can use lower() or upper() in the index keys, but i dont like that.

Carlos.
Saludos,
A.G.P.
---------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform