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 -> problem with view

problem with view

From: Ty O'Kelly <tokelly_at_openplus.com>
Date: Fri, 16 Jul 1999 09:14:44 -0500
Message-ID: <378F3E54.DC91B748@openplus.com>


hi all,

i am having difficulty with the following view. oracle does not like the "NOT NULL" i have in the second decode statment. can any of you gurus tell me what i am doing wrong?

thanks,
ty

create view irlinev10 as

select b.realm,
       a.costctr,
       a.chart,
       a.account,
       a.subacct,
       sum(decode(c.approvedby,NULL,a.amount,0)) unapprovedamt,
       sum(decode(c.approvedby,NOT NULL,a.amount,0)) approvedamt
from irline a,
     costctr b,
     itemreq c
where b.costctr = a.costctr and
      c.request = a.request
group by b.realm,
         a.costctr,
         a.chart,
         a.account,
         a.subacct

/

--
Ty O'Kelly
tokelly_at_openplus.com Received on Fri Jul 16 1999 - 09:14:44 CDT

Original text of this message

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