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.
 
Back
Top