-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Doug --

...and then Comcast said...
% 
% I am querying a table and using the following statement:
% 
% SELECT * FROM financial_affiliates WHERE state = 'wa' AND category = '3' ORDER BY 
name
% 
% I would like to ORDER BY RANDOM - is there an easy way to do that. 

I can't think of a way to do that, but you could perhaps select into a
temporary table containing the financial_affiliates primary key and a
random value and then do a join ordered by that random value field...
I don't know if you can select random() like you can select count() but
perhaps you don't even need that temp table...


% 
% Thanks.

Good luck! & let us know how you end up doing it.


% 
% -Doug


HTH & HAND

:-D
- -- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE/X737Gb7uCXufRwARAmqMAJ0chlS7+TUAvTbfM0lEZzO5dbRexQCggVDl
g4jo8g6tWRAnjdo6TcBPc6I=
=ZlUq
-----END PGP SIGNATURE-----

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to