Hi William, that is simple way to get a random record from DB, here is the
link where you can get information more in detail:
http://msdn.microsoft.com/en-us/library/cc441928.aspx

That is good solution for small records if you have a huge table, then you
probably need use other techniques to do that.
Article above can give to you some food for thoughts I hope.

Regards,
Misha



-----Original Message-----
From: William Seiter [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 23, 2008 4:27 PM
To: CF-Newbie
Subject: Re: Rotating Banner - cfc call

 Misha,

 

I am curious.  I have never used the newid() funciton call in  a sql
statement before, so I immediatley did some research on it after reading
your post.  I didn't see it used in the same fashion that you suggest here.
I was wondering if you could explain what it does here and why it works to
pull a random value?

 

Thank you in advance,

William [always learning] 

 

 
----------
William E. Seiter
Web Developer

Have you ever read a book that changed your life?
Go to: www.winninginthemargins.com
Use PassKey: GoldenGrove
You'll be glad you did.

>Maybe you can try take a random from SQL like:
>
>select top 3 *
>from TopBnr_GDA3
>order by *NEWID()*
>
>it will select random record from your table, so you dont need use any
extra
>code......
>
>Regards,
>Misha
>
>On Fri, May 23, 2008 at 1:03 PM, Frank Velazquez <[EMAIL PROTECTED]>
wrote:
>
>> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3664
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to