Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rand returns almost the same values
Message
From
13/02/2000 00:33:59
 
 
To
13/02/2000 00:27:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00331476
Message ID:
00331477
Views:
14
>I have a table of links which contains about 200 links. On a daily basis, I have a robot which generates randomly 2 selections. However, I have found a weird behavior. I have found that some selections are chosen frequently. For example, the list of Web sites of the day has been selecting the same two Web sites 3 times recently. An example of a simple SQL statement do generate that is the following:
>
>SELECT TOP 2 NUMERO,RAND(-1) AS Dummy FROM LINKS ORDER BY 2,1 INTO CURSOR TEMP

I think I forgot to have the statement RAND(-1) before and have it only RAND() in the SQL. It works better now.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform