Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cursor w/alias,decode,round,sum etc - not working

681929Jan 27 2009 — edited May 8 2009
Hello 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2009
Added on Jan 27 2009
3 comments
786 views