random selection

iainv

New member
Local time
Today, 16:08
Joined
Jan 18, 2003
Messages
5
I want to run a report that will return 10% random selection of dataheld in a table. Can anybody help
 
I assume if you use a select statement such as this:

SELECT TOP 10 PERCENT

without giving it an ORDER BY clause then it will randomly pickup 10%.
 
Although "random" to a point, the TOP 10 PERCENT picked out the same records every time.

If you want to generate completely random records then you might want to have a look at the random test generator I posted on this thread and adapt the code.
 

Users who are viewing this thread

Back
Top Bottom