Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random Sample Generation 1

Status
Not open for further replies.

gregmw

MIS
Jun 11, 2002
23
NZ
Does anyone know if it is possible to create a random sample from a query in access? I need 4 samples from a table that will change each month.

Any help would be great
Thanks
 
SELECT TOP 4 * FROM yourQuery ORDER BY Rnd([some unique number from the select list])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Cheers phv, very clever, it works perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top