Newbies Jim Capparell Posted November 10, 2004 Newbies Posted November 10, 2004 Need to be able to extract from a selected set of records from large file random records and create another file from the selected records. Will use this function from time to time with different total records expected i.e. need 4000 random records from the universe and another time would need 8200 records etc. TIA
dkemme Posted November 21, 2004 Posted November 21, 2004 GoToRecord script step as defined by a calculation. Make calculation Random * get ( foundcount ) will send you randomly to a record in your current found set. May need a round in there to get is working, I've not tested.
Barbecue Posted November 21, 2004 Posted November 21, 2004 If you want to create sets of random records and avoid duplicates, you'll need to do a bit more. A simple way to do what you describe would be to create a script that first shows all records, then goes into a loop that runs X number of times, each iteration doing a GoToRecord randomly as Dkemme described above, followed by an Omit Record. Then after the loop exits, do a Show Omitted, and you have a found set of X random records. Then export/print/whatever the resulting found set. Apologies if this is obvious to you, your profile doesn't show a skill level, and it sounded like you were looking for a full algorithm.
Recommended Posts
This topic is 7310 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now