Radom records from a table

K

kotesh

hi,
can some body help me out in generating a random records from a table.
for example i have some questtionaire in my table which i want to pick
up random questions.
but the problem is, the questions have different levels like Basic,
intermediate and advanced. also groups in questions. please suggest me
how do i do this.
 
E

Ed Warren

You want to build a query with the questionID as one field and a random
number as the second field (re-generated each time you run the query). They
you want to order the quey by the random number and pick the top x records.
If you want to make sure you get say 10 basic, 5 intermediate, and 2
advanced then you will need to add the level, and pick the top x records
from each group.

Take a look at in the help file for random numbers.

Ed Warren
 
Top