Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interesting Sort order
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00911575
Message ID:
00911661
Views:
18
This message has been marked as the solution to the initial question of the thread.
>I was hoping someone might be able to help with this:-
>
>I have a series of records numbered 1 to 12 and I would like to order/index them so that I can pick a starting point and it numbers from there down but then cycles around so that the numbers above just get ordered at the bottom. Sorry it's a bit hard to put into words.
>
>ie Starting with 5 the result would be:-
>5 6 7 8 9 10 11 12 1 2 3 4
>
>I can do it with an iif() statement in the Index but thought there might be something quicker and less cumbersome.
>
>Any help would be appreciated.

Try this:
(FieldName - StartValue) % 12
HTH :)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform