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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get Random Results

Status
Not open for further replies.

FLUZZI

Programmer
Jul 13, 2000
17
0
0
BR
Somebody have some samples of SQL that return random rows?!
 
If the rows have an Identity column, or one that is functionally equivalent, you could use:<br><br><FONT FACE=monospace>round(rand()*1000 + 1, 0)</font><br><br>to generate a random number, and use that in your SELECT statement. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top