Something like this might work:

SELECT DISTINCT IssID
FROM Issue
WHERE NOT EXISTS
   (SELECT *
   FROM issueOption
   WHERE issueOption.issID = Issue.issID)

-----Original Message-----
From: Nick Bourgeois [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 19, 2002 11:32 AM
To: CF-Talk
Subject: SQL Query Question

I'm having trouble with this query.

There are two tables, issue and issueOption.

There is a one-to-many relationship between issue ("one") and issueOption
("many").  issID is the key that joins the two tables.

I want to select all records from issue that are not in the issueOption.  In
other words, get all issues without options.

Thanks in advance,

Nick


______________________________________________________________________
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to