Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BINTOC() ¿Works in index?
Message
De
13/07/1998 03:07:04
 
 
À
10/07/1998 16:51:27
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00115812
Message ID:
00116698
Vues:
16
>>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.
---------
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform