<quote who='Anthony Youngman' date='Wednesday 06 February 2008'> > The one problem with SAMPLE and SAMPLED is that, afaik, they are > pseudo-random. Unless your file is volatile, you are likely to get > approximately the same result set every time (or exactly the same result > set, if your file hasn't changed).
Correct - when we want psuedo-random, we create a i-desc which calls RND to generate a 6 digit integer. Then you can select against it (either sort or pattern match or whatever) and the results will vary from run to run. It's not truly random, but reasonable enough for most uses (far better than SAMPLE or SAMPLED). For example, to randomly select approx 10% of records: :GET.LIST SOMELIST (or SELECT...) >SELECT FILENAME WITH XRANDOM LIKE "...0" or: :GET.LIST SOMELIST (or SELECT...) >SELECT FILENAME BY XRANDOM >SELECT FIELNAME SAMPLED 10 To randomly select 10 records: :GET.LIST SOMELIST (or SELECT...) >SELECT FILENAME BY XRANDOM >SELECT FIELNAME SAMPLE 10 -- Jeff Butera, Ph.D. Administrative Systems Hampshire College [EMAIL PROTECTED] 413-559-5556 "Where I'm from, we believe all sorts of things that aren't true. We call it "history." The Wizard, Wicked ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/