Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Funny index order
Message
 
À
10/07/1998 16:50:58
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00115751
Message ID:
00116725
Vues:
11
>>I have a numeric field I'm trying to index. The data in the field look like, for example:
>>
>>0,2,5,0,12,0,0,15,17,...
>>
>>I want to order them like:
>>
>>2,5,12,15,17,0,0,0,0,...
>>
>>Any ideas how I can do this?
>
>index on (numfield+999999999) % 1000000000 tag whatever
>
>Put your favorite number of zeros and nines.

Thanks Dragan, but Edward P. came up with this, which I think is more aesthetic and generalizable:

"index on iif(field1=0,field1,1/field1) tag q desc"
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform