Generating A Random Set

G

Guest

In my table I have a field labeled "Points Adjust." The data in the field can
contain points that have been adjusted from 1 to 100,000. I need a query that
will pull a random 10 that have had >0 and <20,000 points adjusted. I tried
to set criteria =RAND()X,XX but this did not work. I do not wish to assign a
random value, just pull random samples from the existing data.
 
G

Guest

SELECT TOP X YourFieldNames, ...
Replace the "X" with the quanity of records you want.

If your table has an autonumber field then you can use a calculated field to
simulate a random number.
Right(Left((4.6345679/ [AutoNUM]) *10,000)5),3)
Sort it ascending.

For a different group use a different number than 4.6345679 in the formula.
 
J

John W. Vinson

If your table has an autonumber field then you can use a calculated field to
simulate a random number.
Right(Left((4.6345679/ [AutoNUM]) *10,000)5),3)
Sort it ascending.

Or Rnd([autonumber])...


John W. Vinson [MVP]
 

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