More than likely something like so...

SELECT   c.id, c.description
FROM   choiceTable c,productChoiceTable pc
WHERE   c.id = pc.choiceid
AND   pc.productid NOT IN
     ( SELECT productid
      FROM productChoiceTable
      WHERE productid = '#url.productid#' )




Douglas Brown
Email: [EMAIL PROTECTED]
----- Original Message -----
From: "Paul Giesenhagen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 7:22 AM
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
>
>
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to