>>
>>select * from your table into cursor tmp
>>for i=1 to 10
>> lnRecno = int(rand()*_tally)
>> go lnRecno
>> save the record somewhere
>>endfor
>>
>>It's not the best technique, it's my way ;)
>
>To have success with this, you'll have to make sure a filter is not enabled. I did this by putting another field called .T.
>
>Also, as I pointed to Nick, we need to make sure we do not select the same record twice.
>
>IAC, this is about the same as I did. In my case, I wanted to be able to use a INLIST command to get the entire result from a final SQL.
It's not at all the same thing. You select one record randomly and take the following 9 records. Vladimir's code selects 10 times randomly, which means the records will not be in the sequence they are in the cursor (except a very small probability).
Vlad