SQL server mike. >It might help to know which database you are using (SQL Server?). >There are many ways to do this, but I don't think you provided enough >detail to identify the best method. Below is one method. > >SELECT 1 >FROM product p >WHERE product_id = #id# >AND >(stock_level > 0 >OR EXISTS ( > SELECT 1 > FROM product_to_product_options ptpo > WHERE ptpo.product_id = p.product_id > AND ptpo.stock_level > 0 >) >) > >If the query returns a row, then the product is in stock. > >Good luck, >Mike Chabot > >On Mon, Mar 31, 2008 at 8:45 PM, Mike Little <[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-Talk/message.cfm/messageid:302391 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

