Maybe I mis-understood what you said about this, but you mentioned a complex
process for determining which ones are active still.
If you have column in the table for each banner that represents the date it
expires, then you can use this directly as a filter to prevent
it's selection. You don't need to loop over and manually expire each one.


Like this:

SELECT top 1 *
FROM dbo.#request.stationName#_banner_top
WHERE
         date_remove > #CreateODBCDate(Now())#
AND
         status = 0
AND (       page_location = 'Front Page'
         OR  page_location2 = 'Front Page'
         OR  page_location3 = 'Front Page'
         OR  page_location = 'Every Page'
         OR  page_location2 = 'Every Page'
         OR  page_location3 = 'Every Page' )

ORDER BY newID()

HTH

=]

-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:322146
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