But, suppose you have a cursor with a million random integer values, not related to each other. If you want 40 random values, taking 40 sequential records is just as good as taking 40 at random.
This is like to use a repeat of RAND(seed) with a RAND() start.
x=INT(RAND()*1000000)
FOR k=1 TO 40
? x
x=INT(RAND(x)*1000000)
NEXT
But, this is correct for a single shot. ( the values within a shot are not correlated )
But this generates one correlation between more shots
( if you get the same start point, se sequence is the same ).
The next is a pure random process,
no correlation within a shot and no correlation between more shots:
FOR k=1 TO 40
x=INT(RAND()*1000000)
? x
NEXT
Fabio