Reverend writes "This has got me. I am looking for a way to create a record set with multiple random values using a single, non-iterated/non-looped, select statement. On a 265 record DB I even tried . . .
"select top 100 mytable.*from mytable where Randomizer() = 0 order by rnd(isnull(mytable.question) * 0 + 1)"
where the Randomizer function is: Function Randomizer () As Integer Static AlreadyDone As Integer If AlreadyDone = False Then Randomize : AlreadyDone = True Randomizer = 0 End Function
This appear to be a variant of the same thing to work around the lack of NewID() in Access. I'm puzzled as to how either do their stuff. It looks like a way of tapping into (or fooling) the actual SQL parsing/searching mechanism. Is this approach legal/reliable ? Any insights would be very gratefully received...
I've developed a Ranomizing select that will return you any number of records in an *almost* random order. You can see patterns but for the most part they are random.
I have saved 1000 Question in Sql server 2005 database table And I want to retrieve the any 50 questions in random order just like the online exam pattern for perticular session.