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

Select Random Record 1

Status
Not open for further replies.

bigjohnxx

Programmer
Jan 27, 2005
2
US
Periodically, I need to review 20% of the data to check for data entry errors. Is there a way to create a query to return a percentage of total record of a table in random?

Thanks in advance.

 
bigjohnxx,

This may have what you need. If not just use DLookUp with a count * (times) your percentage, then use this example. Sorry I have not used it.

Random Records

I hope this helps.... [thumbsup2]


 
SELECT TOP 20 PERCENT * FROM yourTable
ORDER BY Rnd(yourTable.NumericFieldName)

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

Part and Inventory Search

Sponsor

Back
Top