Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Funny index order
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00115751
Message ID:
00115777
Views:
12
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform