Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexed Table Displaying in Incorrect Order
Message
De
23/11/2002 12:20:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00726119
Message ID:
00726164
Vues:
16
>>I know that if you want to combine a string field and non-string field in an indexed expression that the non-string fields have to be converted to strings. Is this true for any index expression of more than one field?
>>
>>TIA.
>
>
IFLDA   IFLDB
>1    +      1      = 2
>1    +      2      = 3
>2    +      1      = 3
>1    +      3      = 4
>2    +      2      = 4
>
>The result looks ascending to me. I guess you really meant to concatenate (string version of) the values, and not just sum them. Try using:
> Index on Transform( iFldA ) + Transform( iFldB ) Tag XFLDAB

Transform() produces a variable-length result, not suitable for indices. I suggest using str(). Otherwise, I agree with your analysis.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform