That is a beautiful piece of code.  I have to do this for a site next 
week..saved my weekend thanks.


At 11:08 AM 12/12/00 -0900, you wrote:
>declare @rand_id int
>while @rand_id is null
>BEGIN
>set @rand_id = (select id
>from table
>where id = rand() * (select max(id) from table) + 1)
>END
>select * from table where id = @rand_id


end
*****************************************************************************************
"It has become appallingly obvious that our technology has exceeded our 
humanity. "

- Albert Einstein (1879-1955)
*****************************************************************************************
Michael "Maxx" Porter
Vice President
Paradox Studios Inc.
847-869-3673
mailto:[EMAIL PROTECTED]
http://www.theparadox.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to