try... SELECT c.id, c.description FROM choicetable c WHERE c.productid = '#URL.productid#' AND c.id NOT IN ( SELECT pc.choiceid FROM productchoicetable pc WHERE pc.productid = '#URL.productid#' )
-----Original Message----- From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 10:22 AM To: CF-Talk Subject: OT: SQL Query 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