How can i make a quick random select query

  • Thread starter Thread starter Carl Schuster
  • Start date Start date
C

Carl Schuster

How can i make a quick random select query from a table with data? (can give
output to a form or report)
Carl S.
 
As fast as you can:
1. Create a new query
2. Switch to SQL View
3. Copy and paste the following:
SELECT TOP 1 Orders.OrderID
FROM Orders
WHERE (((Orders.OrderID)=CLng((11077-10248+1)*Rnd()+10248)));

Any table or query can "give output" to a form or report.

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

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