SELECT c.id, c.description FROM choiceTable c WHERE c.id = '#url.productid#' AND NOT EXISTS ( SELECT pc.id FROM ProductChoiceTable pc WHERE pc.productid='#url.productid#' )
--- Paul Giesenhagen <[EMAIL PROTECTED]> wrote: > I have a query that I am trying to get all my > descriptions from my choiceTable that are not found > in my productChoiceTable that have a productid of a > url.product value. Basically if a choice id is > found in the productChoiceTable that also has the > url.productid in the productid column, it is > discarded in the result. > > Here is my table layout: > > choiceTable > id, choice, description > > productChoiceTable > id,choiceid,productid > > <!--- Current query that is returning 0 records > (which is not the case). ---> > SELECT c.id, c.description > FROM choiceTable c, productChoiceTable pc > WHERE c.id = pc.choiceid > AND pc.productid NOT IN ('#url.productid#') > > Any suggestions apreciated! > > Paul Giesenhagen > QuillDesign > > > ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists