
April 13th, 2000, 01:24 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
<i><b>Originally posted by : Barry B</b></i><br /><br />I don't know about "best" but I have used the following.<br /><br />Call recordset<br />Get the number of records in the record set<br />Divide that number by the number of random records you want to return. Go to the next lower number. Generate a random number based on the the results of your divide. Us this as your starting point in the recordset and jump the number of records (the results of the divide) to get the next.<br /><br />Alternately<br /> Get the number of records. Divide by 2. Get random number based on the divided results. Start there and jump (pick a number) choosing your 10 records. While not completely random it will give you the results you want.<br /><br />------------<br />Chris Bond at 4/4/2000 10:01:18 AM<br /><br />Hi,<br /><br />Whats the best way to return a random 10 records form the sql table.<br /><br />Thanks,<br />Chirs
|