Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order Problem.
Message
De
24/03/2000 12:36:51
 
 
À
24/03/2000 10:59:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00349932
Message ID:
00350084
Vues:
36
>>How can i create an index for two numeric fields thats result is same with this;
>>
>>select * from table1 order by a,b
>>
>>a and b are numeric fields.
>
>If a and b are non-negative:
>
>INDEX ON STR(A,size,decimal precision) + STR(B,size,decimal precision) ...
>
>will work to build a string expression by concatenation. Another approach where the issue of total decimal precision of the two concatented expressions will fit within the limits of precision of a VFP floating point computation:
>
>INDEX ON (a * 10^order of magnitude of max value of B+1)+ b +...
>
>will result in a number adjusted for relative magnitude; the first has the advantage of being magnitude/precision independent at the cost of not working correctly when negative values are possibly an issue. With very large numbers, rounding inherent in floating point representations can step in and make things mis-sort since the decimal precision of a computation has limits as we've discuissed before.
>
>>Thanks

If we were dealing with integers ( instead of numerics ) here, could we use BINTOC() to create the index and would it make it more compact/efficient?

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform