random selection of records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way I can select recors randomly in query?

What should I do for that?

Any help, really appreciate.

Thank you
 
SELECT TOP 16 asa.*
FROM asa
WHERE (((randomizer())=0))
ORDER BY Rnd(IsNull([asa].[AsaID])*0+1);

asa is the table name. AsaID is the primary key field. It is also a number
field so that you can do math on it like above. If your primary key field is
not a number or you don't have a PK (bad) in that table, create an autonumber
field and use it.
 

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

Back
Top