Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate Random Number using a Query

Status
Not open for further replies.

jontheduke

IS-IT--Management
Nov 26, 2002
1
US
I am trying to generate a random number and then make a table with just that number.
 
Hi Jon!

Access has a function to generate a random number.

It's "rnd".

Information on it can be found here:

To insert your randomly selected number into a new table, use the following sql statement in a query or procedure:

Code:
SELECT Rnd() AS Random_Number INTO tblRandom;

This page has sample code to randomly select records from a table:

Hope this helps! Good Luck!
Ami D. Shroyer, MCP
amidenise@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top