Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compound Index
Message
De
15/08/1997 16:33:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
14/08/1997 01:37:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00044576
Message ID:
00045040
Vues:
40
> > Hi all, > > I have a compound index on the following expression, > cnoee+DTOS(dtrans)+cdtrans where cnoee is Employee #, dtrans is date and > cdtrans is code. Is there any way I can do descending on dates but acending > on the others? Presently I can only think of using a large number to minus > DTOS(dtrans). Any other way? > > Thanks. Another old indian trick gives: Index on something+(str{01.01.2200}-cdtrans,4,0))+the_rest tag ... It works for next two centuries, and then you have to reingeneer the project :) Still, you might be better off by having three separate tags on the three fields, and when you need this specific order you select * from the_table into curs dummy; order by cnoee, dtrans desc, cdtrans If you need use the compound index to find the (date of) last occurence of a particular cnoee, you can simply set order to the_tag desce seek m.cnoee ....and you got the last record with cnoee=m.cnoee. Depending on what you need you may prefer one approach more than another, or invent something quite different. This is Fox, everything is feasible :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform