Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Subquery Question
I tried your original suggestion with SUM and I don't get anything in
return. I replaced SUM with DECODE and the syntax is wrong. Here's
what I tried:
select papp.ARBEITSPLAN_NR
from w100.papp
group by ARBEITSPLAN_NR
having
decode(case when papp.BELEGUNGSEINHEIT_NR in (3400,3500,3430)
then 1 end) = 3
and count(*) = 3
I don't think that I can use CASE because I'm running a 8i database. SUM and DECODE are supported on 8i though. Received on Fri Feb 18 2005 - 06:58:22 CST