Is there something like this for use with an access database?

Thanks

Colin
----- Original Message -----
From: "Jack Lavender" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 26, 2003 12:47 PM
Subject: RE: Randomizing Query Output


>
> Please be aware that unless you keep and reseed with the key pulling a
> uniform number out of a psuedo-random number generator will not give the
the
> nice distribution you are seeking. Not all RNGs  (Random Number
Generators)
> are equal. I have not tested it since CF 3.0, it was poor then.
>
>
> I suggest that you keep a tally on the side when you pull/use records.
This
> will allow you to run tests on the usage to demonstrate the distribution.
>
> Of course all of this rigor depends on if it really matters.
>
>
> for programing references:
>
> The Art of Computer Programming : Seminumerical Algorithms by Donald
Knuth.
> Algorithms in C++ -- Sedgewick
>
> A dated but seminal introduction to the problem:
>
> Simulation Modeling and Analysis
> by Averill M. Law, David W. Kelton, W. David Kelton, David M. Kelton
>
> good luck,
> jack lavender
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of PJ Gaenir
> Sent: Wednesday, February 26, 2003 11:20 AM
> To: [EMAIL PROTECTED]
> Subject: Randomizing Query Output
>
>
> I hope someone can help with this.  I am in a sort of desperate timing
> situation here.
>
> I have a testing facility that needs to pull all records of a certain spec
> out of a
> table, and randomize how they are retrieved.  Then I loop the first X# of
> them
> into a list, and the test is based on this list.  Since they are supposed
to
> be
> randomly ordered, it shouldn't matter that I'm choosing the first quantity
> of
> them.
>
> The rand functions I normally use for 'semi-random' output are just not
> working
> I guess.  The instructor has 140 questions in the pool, and he is pulling
20
> questions for the test.  The questions keep coming up from the first
> chapter,
> which means, the first records.  I will put below the two codes I've tried
> for it,
> neither of which has worked.  Any better suggestions would be dearly
> appreciated.
>
> ----------code2----------- - 2nd try as the first didn't work well. It
does
> order them
> differently mind you, but is not nearly random enough to 'mix up' 100
items
> so
> the first 20 chosen are as likely to be from middle or end as beginning.
>
> <cfquery name="get">
> select id
> from table
> where [yadayada]
> order by rand(#randrange(11,289)#)
> </cfquery>
>
> ----------code1----------- (I first had this)
>
> <cfset randnum1 = "#randrange(3,289)#">
> <cfset randnum2 = "(#variables.randnum1# * #randrange(7,3963)#)">
> <cfquery name="get">
> select id
> from table
> where [yadayada]
> order by rand (#randnum2# * ((piid / 3) * 1.73))
> </cfquery>
>
> The CF docs I have don't really address this.  I have another randomizing
> code that basically uses a place in a text field by letter, it is not
> anywhere
> near really random either, but that won't work in this case.
>
> Best regards,
> PJ
>
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To unsubscribe:
>    Send UNSUBSCRIBE to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
>
>
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To unsubscribe:
>    Send UNSUBSCRIBE to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
>
>


-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe: 
   Send UNSUBSCRIBE to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to