Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Random records
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00935859
Message ID:
00935954
Vues:
22
Frank,
rand(-1) & seed the randomw number generator

select top 10 rand() as randkey, * ;
   from ... ;
   order by 1
Although in VFP it's possible that you will get more than 10 rows if ties are involved so you need to check for that condition. VFP9 will fix this problem.

>By any chance anyone knows of a routine/function similar to that in sql, newid(), to generate random records from a table in vfp?
>
>The sql select statement, select top 10 id from tblTest order by newid()
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform