> I have a Query of Query right now that I'd like to have the results sort 
> order randomized.  Any ideas?   I've seen examples
> dependent on the dbms for producing a random randomization, but is there any 
> way to do that within QofQ?   The base query that
> my QoQ is operating on is a cached Oracle query.
>
> Also brainstorming for other alternatives.  It's a simple round robin load 
> balancer.   I'd rather not have the first unit just by database
> index order selected all the time.

There's no way you can do that with SQL in query of queries, as far as
I know. But you can easily do it by treating the query object as if it
were an array:

query.columnname[row]

So, given that, you can do this:

1. Find the number of records.
2. Choose a pseudo-random number between 1 and the number of records,
that has not been chosen on previous iterations.
3. Select the corresponding record and display it, or whatever.
4. Repeat (2) and (3).

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more informa

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327159
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to