Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> help with work project - completely random sample but all numbers picked within 12 tries
This is where my math classes should have come in handy...
I want to do a random sampling of a database of 100k records. I need to completely randomly select a group of records to be processed each month for a year (12 times). A record can be processed more than once and that is preferred- some records must be pulled twice in a year. All records need to be processed by the end of the year (the twelfth sampling).
My idea is to write a random number generator to pick about 10% of the numbers for 10 months and then split the remaining unchosen numbers up for the last two months. The problem is that this will have to pass the eyes of a lawyer to prove it's truly random. I have never worked with randomization before and I don't want to get hung up here.
So how would you do this? Can I write a PL/SQL SP to do this? Does anyone have any examples to share or to point to on the web?
thanks,
Don Received on Wed Jun 09 2004 - 13:45:29 CDT