Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Randomly select n unique codes from 5mln table
Message
From
09/11/2001 15:31:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00579211
Message ID:
00579922
Views:
25
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>How can I randomly select n (110) codes from some huge table, so these codes would be unique? I'm trying to create a test case now...

I was forgetting that I had, at some moment, used something like:
copy to sample for recno() % 1000 = 0
In other words, copy all records whose recno() is a multiple of a certain number.

Quick to code, not so quick in executing.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform