Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mixed ascending and descending in same tag..?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00500818
Message ID:
00500849
Vues:
17
I think it wouldn' work properly because date() changes from day to day.
Expression
date()-ValueDate
value will increase by 1 with each passing day.


>>>For some reason, I'm stumbling trying to figure this one out, so I'm looking for suggestions.
>>>
>>>We have a file of interest rates which we are currently indexing on:
>>>
BankCode+DTOS(ValueDate)
>>
>>
BankCode+padl(date()-ValueDate),10)
(last number could be less, depending on how old your data are)
>>
>>>
>>>Our form class makes use of this primary tag to properly populate our 2 combo boxes for the 2 key fields for the user to choose the right record from. We have a user that wants us to change the intial display to be based on the most recent date instead of the first date for the corresponding bank code.
>>>
>>>So, the question is: how do I create an index expression that produces an ascending sort of the bank code and a descending sort of the date? We can't change the form to use a view or SQL cursor because that would be too huge an overhaul for this one item. :)
>>>
>>>TIA
>>>
>>>Laterness,
>>>Jon
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform