How do I select a specific amount of random values for individuals

I

I don't know??

How do I select a specific number of random values from each agent in a query
or table.

Case: I have a list of audits recorded in a table or query that list by
agent name and claim number completed. What I want is to select a specific
number of rows for each agent, but that selection be random rows for each
agent.
 
P

pietlinden

How do I select a specific number of random values from each agent in a query
or table.

Case: I have a list of audits recorded in a table or query that list by
agent name and claim number completed. What I want is to select a specific
number of rows for each agent, but that selection be random rows for each
agent.

check out "returning random records"
http://www.mvps.org/access/queries/qry0011.htmat www.mvps.org/access

then you could do a top values query on top of that to select the top
N records of the set. (If you open the query in design view, there's
a dropdown at the top of the screen that says "All". put in the # of
records you want returned, and you'll only get that many.)
 
I

I don''''t know??

I found a way to actually create a random sample and then select a specific
number of values from each user/agent. I did so by creating a duplicate
table with an additional field called RandomValue. Then I ran the query
requesting the top x RandomValues by user and and ordered by the RandomValue.

Thanks to all those the posted helpfull input.

In (Select TOP 4 [RandomValue] From "activity table" Where [User]=[User
List].[User] Order By [RandomValue] Desc)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top