Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ascending w/Descending in same index?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00314175
Message ID:
00314185
Vues:
19
I'm pretty sure this will work! Thanks! I used to do stuff like this in the old days, just forgot I guess. Also, I realized I lied, pr_number was not character, but I guess you figured that out. <g>

Thanks again!

>Hi Randy,
>
>How about:
>
>UPPER(ts_number)+LTRIM(STR(99999999 - pr_number,8,0))
>
>>Hi,
>>I need to be able to create an index with 2 fields where the first column is ascending and the second column is descending. They are both character fields. This is how the data looks:
>>
>>Ts# Pr#
>>------------ ----------
>>98-10017-A 108155
>>98-10016-A 106997
>>98-10015-A 107070
>>98-10013-A 105211
>>98-10010-A 105210
>>98-1001-E 118757
>>98-1001 CB 114641
>>98-1001 125183
>>98-1001 121756
>>98-1001 109035
>>
>>I am using the follwing index expression:
>>UPPER(ts_number)+LTRIM(STR(pr_number,8,0)) DESCENDING
>>
>>However, I really need it to be ascending on the first column, descending on the second within this same index. Any ideas?
>>
>>I have no idea how to post in fixed width so I apologize for the formatting of the data above. TS# is actually 30 characters long.
>>
>>Thanks in advance.
Randy Jean
Orion Group Software Engineers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform