Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Subquery Question

Re: Subquery Question

From: Paul Izzo <paul.izzo_at_mosca-ag.com>
Date: 18 Feb 2005 04:58:22 -0800
Message-ID: <1108731502.183415.271800@z14g2000cwz.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US