you can always use...

select *
from myTable
order by newid()

that will select everything from that table (not recommended, but for
this purpose it will work)

the order by newid()
will create a new UUID for each row, and of course, but doing so, will make it
a random result set as those are VERY unique values.  they wont too
random, as far as their value, since they are made as a combo of the
servers mac address and the time of day and some sort of algorith like
that, but at least it will work to give some random sets.

now about making sure all are used at least some of the time, thats a
whole 'notha topic.

tw


On Tue, 28 Sep 2004 15:15:55 +0100, James Smith <[EMAIL PROTECTED]> wrote:
> Is there any way to randomise a query result set?  I was thinking of
> adding...
>
> SELECT rand() AS RandomColumn, OtherQueryFields, .......
> FROM .......
> WHERE .......
> ORDER BY RandomColumn
>
> to the query but am not sure if this will produce a good randomisation, it
> doesn't need to be perfect, just good.
>
> I am selecting about 800-900 records of which 400-800 will be used (don't
> ask!) and I need to make sure that (on average) they are all used.
>
> --
> James Smith
> [EMAIL PROTECTED]
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to