Re: use of except
Date: Mon, 17 Oct 2011 06:15:47 +0200
Message-ID: <4e9babf3$0$8560$426a34cc_at_news.free.fr>
"elodie" <elodie.gillain_at_gmail.com> a écrit dans le message de news:
d16e6671-ec5c-417c-af18-89721b386dc9_at_ff5g2000vbb.googlegroups.com...
| Hi everyone,
|
| I would appreciate if someone could help me fix the following sql
| query.
|
| The goal of the query is to find those years and months where a total
| is either less than 50 or more than 100.
|
| SELECT month, year, MAX(nsick)
| FROM sick
| GROUP BY month, year
| EXCEPT
| SELECT month, year, MAX(nsick)
| FROM sick
| GROUP BY month, year
| HAVING MAX(nsick)>50 AND MAX(nsick)<100;
|
| I get the following error message:
| EXCEPT
| *
| ERROR at line 4:
| ORA-00933: SQL command not properly ended
|
| Thanks in advance
MINUS
Regards
Michel
Received on Mon Oct 17 2011 - 06:15:47 CEST