Try adding parenthesis around all the ORs, so:

SELECT top 1 *
FROM dbo.#request.stationName#_banner_top
WHERE 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()

Dominic



2009/5/4 Sin Tec <[email protected]>:
>  SELECT top 1 *
>        FROM dbo.#request.stationName#_banner_top
>        WHERE (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 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:322144
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to