cursor w/alias,decode,round,sum etc - not working
681929Jan 27 2009 — edited May 8 2009Hello all,
I'm Herb. I'm having trouble creating a cursor. My select statement has decode,round, sum, mutiplication etc.
Example.
********************************************************************************************
cursor first_info (ppe_date_in varchar2) is
(select decode(pdrdedn_opt_code1,'P1',(round((sum(nhrdist_amt) * .095),2)),
'P2',(round((sum(nhrdist_amt) * .095),2)),
'P3',(round((sum(nhrdist_amt) * .095),2)),
(round((sum(nhrdist_amt) * .08),2))) v_contribution,
to_number('0.00') p_contribution,
pdrdedn_pidm v_pidm
--
from ptrcaln, pdrdedn, phrdedn, nhrdist, spriden, nbrbjob, nbrjobs
********************************************************************************************
Has anyone been successful in using an arrangement like this? My procedure has no errors, but I have no data also. CAn someone please help.
Herb