Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Random generation
Message
From
15/05/2005 20:19:15
Ken Dibble
Southern Tier Independence Center
Binghamton, New York, United States
 
 
To
14/05/2005 21:54:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
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:
01014449
Views:
23
>>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.

Okay. I see that the ORDER BY is critical then.

Thanks.

Ken
Previous
Reply
Map
View

Click here to load this message in the networking platform