I tried Mikes code: <CFQUERY DATASOURCE="#Green#" NAME="GetADs"> SELECT top 1 * FROM dbo.banner_left ORDER BY newID() </CFQUERY>
works great for the random but it screws up the views. <CFSET add = incrementvalue(val(GetADs.views))> <CFQUERY datasource="Brooke" name="AddView"> UPDATE dbo.banner_left SET views = #add# WHERE ADID = #ADID# </CFQUERY> It either doesnt count it or it will pull the views from another record puts it in that record. :( I will try working with Isaacs code but im not to fond of the delay in the delete. Thank you guys for all your help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316440 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4