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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Random Sample in Access? 1

Status
Not open for further replies.

timbo6mel

IS-IT--Management
Apr 1, 2004
2
US
I understand there is not a function to select a random sample from an Access table, but is there an alternative means of doing this? I've updated a "Random" column with a random number generator, so each record is now assigned a random number. I can order the table by this column, but how do I then pull only the first, say, 6 records for my sample?
 
Have a look at the TOP predicate:
SELECT TOP 6 ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
That worked beautifully! Thanks much for the assistance!!!!

mel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top