Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about indexes
Message
From
21/06/2001 15:16:40
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00522095
Message ID:
00522116
Views:
9
This message has been marked as the solution to the initial question of the thread.
>Does anyone know how I can create an index that would allow me to set a random order?

The mathemticians will probably get all fussy over this, but you could index off of a little udf that excepts a value (a field from your table) and builds a random number off of that.

Otherwise, I wouldn't use an index for this, I'd create a field just for the sort, have a routine populate that field randomly (using rand() most likely), and SET ORDER to an index on that field whenever you want a new random view of your cursor.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform