Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rand returns almost the same values
Message
De
13/02/2000 00:33:59
 
 
À
13/02/2000 00:27:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00331476
Message ID:
00331477
Vues:
15
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform