Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Random generation
Message
From
14/05/2005 21:54:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
14/05/2005 21:48:19
Ken Dibble
Southern Tier Independence Center
Binghamton, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01013774
Message ID:
01014302
Views:
26
>Spaseebo. Ochen khoroshaw. :-) But, why the lowest values instead of the highest?

This is because
... ORDER BY Field
is the same as
ORDER BY Field ASC
* (ascending)
So, random values are generated, the records are sorted in ascending order by this field (since ASCending is the default), and then the first "n" records - in the specified order - are selected.

Of course, to obtain 150 random records, it is quite irrelevant whether you select the first 150, the last 150, or even (if there are enough records) the first 150 that have a value higher than 0.5, for example.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform