James_Sheppard
12-04-2005, 11:41 AM
Hi
I have started to create a minus query, but I am unsure on how to start it.
I have the last part of the minus statement which goes like this.
MINUS
SELECT s.site_id, s.description
FROM holiday h, site s, holiday_site hs
WHERE s.site_id = hs.site_id
AND h.holiday_id = hs.holiday_id
AND h.difficulty_id IN ('A','B');
The query needs to return holidays which do not have an "Easy" or "Moderate" rating. The last part of the minus statement is correct, its just the first part I am unsure on.
I had thought that I would just use the same select statement above but add 'C' 'D' and 'E' to the last line, and then the minus fuction will remove 'A' and 'B'.
There are five tables - holiday, difficulty, site, holiday_site and holiday_date.
Just wondering if anyone has an idea what would the first part of the minus statement be like.
Many Thanks in advance for any ideas or suggestions.
I have started to create a minus query, but I am unsure on how to start it.
I have the last part of the minus statement which goes like this.
MINUS
SELECT s.site_id, s.description
FROM holiday h, site s, holiday_site hs
WHERE s.site_id = hs.site_id
AND h.holiday_id = hs.holiday_id
AND h.difficulty_id IN ('A','B');
The query needs to return holidays which do not have an "Easy" or "Moderate" rating. The last part of the minus statement is correct, its just the first part I am unsure on.
I had thought that I would just use the same select statement above but add 'C' 'D' and 'E' to the last line, and then the minus fuction will remove 'A' and 'B'.
There are five tables - holiday, difficulty, site, holiday_site and holiday_date.
Just wondering if anyone has an idea what would the first part of the minus statement be like.
Many Thanks in advance for any ideas or suggestions.