Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Funny index order
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00115751
Message ID:
00115777
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?
>>
>>calculate max(field1) to nMax
>>index on iif(field1=0,nMax+1,field1) tag q
>>set order to q
>
>Excellent! Thanks Edward.

You know, this one is probbaly even better:
index on iif(field1=0,field1,1/field1) tag q desc
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform