ORA-00907:缺少右括号00907。00000-“缺少右括号”

时间:2019-11-10 22:06:16

标签: oracle11g

select  s.sname, count(*)
from    suppliers s, parts p, catalog c
where   p.pid = c.pid and c.sid = s.sid
group by s.sname, s.sid
having every (p.color = 'green')

select s.sname, max(c.cost)
from    suppliers s, parts p, catalog c
where   p.pid = c.pid and c.sid = s.sid
group by s.sname, s.sid
having some (p.color = 'green') and some (p.color = 'red')

当我执行以上两个查询时,它显示缺少右括号。

1 个答案:

答案 0 :(得分:1)

Oracle不支持拥有EVERYSOME

您可以使用带有Haves子句的case when语句来处理它。