Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Funny index order
Message
 
To
10/07/1998 16:50:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00115751
Message ID:
00116725
Views:
10
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform