How to report block anonymous

Declare

CURSOR c_je2acct_othr
IS
SELECT j.jemq_num, j.ml_retail_account,
-(CASE WHEN j.exer_type = 4 THEN j.sar_shares ELSE j.shares END) shares, - deleted *-1 of sar_shares Manu 02/12/04
/ * Commented on 01/02/07 * /.
(CASE WHEN j.exer_type = 4 THEN
fn_get_shares (u.user_id, u.exer_num, u.soc_sec, j.
sar_shares)
ELSE (case where you.exer_type = 2 and you.opts_exer! = u.shrs_sold and j.shares = u.shrs_sold then 0 j.shares other purpose)
END actions),
-removed *-1 of sar_shares Manu 02/12/04
j.name_first,
j.name_last, j.exer_type, j.ml_sec_num, j.ivr_plan_num,
j.exer_dt, j.grant_dt, j.user_id, j.mlu_rowid, j.settle_dt,
j.exer_num, j.plan_type, j.grant_num, j.acct_num_othr,
j.add_cancel,
/ * (CASE WHEN j.exer_type = 4 THEN j.sar_cash_amount *-1 - turned negative Manu 12/02/04 ml_retail Distr.)
has commented on above the line for the calculation of the other product plans it to sell sar.
*/
(CASE WHEN j.exer_type = 4 THEN
Pk_Xop_Citibank_Forex.fn_get_netamount (u.user_id, u.
exer_num, u.soc_sec,
u.sar_cash_amount, NVL (u.comm_value, 0),
NVL (u.tot_fee, 0),
NVL (u.multi_curr_handling_fee, 0))
-Removed the negative as on ml_exer_upload that all values are + ve.
ON THE OTHER
((DECODE (u.exer_type,0,u.opts_exer * u.mkt_prc,u.shrs_sold * u.mkt_prc)))
))
-(ROUND ((u.opts_exer * NVL (u.opt_prc, 0)), 2))
-SPIF 39060 added a series of conditions.
+ DECODE (NVL (u.shrs_wthld_for_taxes, 'n'),
'Y', 0,
ROUND (u.tot_tax, 2)
)
+ u.tot_fee
+ NVL(u.multi_curr_handling_fee,0)
+ u.comm_value
)
-u.backup_withholding
)
END) AS gl_amt,
T.je_othr_mlacct_jemsg AS vc_trailer_desc,
u.opts_exer,
u.shrs_sold,
u.rsu_type
OF TB_XOP_JEMQ j, TB_ML_EXER_UPLOAD u, TB_FC_COMPY T
WHERE j.q_flag = ' n AND u.je_flag = 'Y '.
AND j.entry_dttime > = TRUNC (SYSDATE)
AND j.entry_dttime < TRUNC (SYSDATE) + 1
AND j.source = 'X '.
AND j.acct_num_othr! = ""
and (case when you.exer_type = 2 and you.opts_exer! = u.shrs_sold then (case where j.shares = u.shrs_sold 0 then 1 other end) otherwise 1 end) = 1 Fix for PCTUP00566081
AND (disp_flag <>has ' GOLD disp_flag IS NULL) Added on 25/01/2011 for PCTUP00493542 Fix by PASCAL MARAN
and j.current_status = "2 q" removed not necessary now in the new plan
AND NOT EXISTS)
SELECT 1
OF TB_XOP_JEMQ j2
WHERE j2.prev_jemq = j.jemq_num
SOURCE = 't'
AND j.add_cancel = j2.add_cancel
AND j.user_id = j2.user_id
AND j.exer_num = j2.exer_num)
AND j.mlu_rowid = u.ROWID
AND ' CMS'| T.compy_acronym | ' _USER' = j.user_id
ORDER BY add_cancel DESC;

v_mlac_mesg VARCHAR2 (1000);

-JE_OTHR_MLACCT_JEMSG
BEGIN
dbms_output.put_line ('success');
FOR v_je2acct_othr IN c_je2acct_othr
LOOP
dbms_output.put_line ('success1');
BEGIN
dbms_output.put_line ('success2');
IF v_je2acct_othr.add_cancel = "C".
THEN
dbms_output.put_line ('success3');
UPDATE TB_XOP_JEMQ
SET add_cancel = DECODE (current_status,
"RJ"
add_cancel,
'C'),
q_flag is DECODE (current_status, 'RJ', q_flag, 'n').
activ_dt = DECODE (current_status,
"RJ"
activ_dt,
SYSDATE)
WHERE prev_jemq = v_je2acct_othr.jemq_num
AND user_id = v_je2acct_othr.user_id
AND exer_num = v_je2acct_othr.exer_num
SOURCE = 't';
dbms_output.put_line ('success4');
ELSIF v_je2acct_othr.add_cancel = "A".
THEN
dbms_output.put_line ('success5');
-handling amount and actions to transfer when different exercise types
v_je2acct_othr.gl_amt CASE :=(
WHEN v_je2acct_othr.exer_type = 0 THEN 0
WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer
! = v_je2acct_othr.shrs_sold
THEN v_je2acct_othr.gl_amt
WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer =
v_je2acct_othr.shrs_sold
THEN v_je2acct_othr.gl_amt
Of OTHER v_je2acct_othr.gl_amt
(END);
-Comments on 01/11/2006 for fixing 30585
/ * v_je2acct_othr.shares: = (CASE
WHEN v_je2acct_othr.exer_type = 0 THEN v_je2acct_othr.opts_exer
WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer! = v_je2acct_othr.shrs_sold
THEN v_je2acct_othr.opts_exer - v_je2acct_othr.shrs_sold
WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer = v_je2acct_othr.shrs_sold
THEN 0
Of OTHER v_je2acct_othr.shares
(END) ;*/
-Comments on 01/11/2006 for fixing 30585

v_je2acct_othr.shares CASE :=(
WHEN v_je2acct_othr.exer_type = 0 THEN v_je2acct_othr.
Actions
-Opts_exer replaced with the amount of shares of the previous sheet for fixing 30585
WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer
! = v_je2acct_othr.shrs_sold and v_je2acct_othr.shares! = 0 and v_je2acct_othr.plan_type <>0 - condition plantype added to QC: PCTUP00493542
THEN v_je2acct_othr. Actions - v_je2acct_othr.shrs_sold
-Opts_exer replaced with the amount of shares of the previous sheet for fixing 30585
WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer =
v_je2acct_othr.shrs_sold
THEN 0
Of OTHER v_je2acct_othr.shares
(END);
dbms_output.put_line ('success6');

IF LENGTH (TRIM (v_je2acct_othr.acct_num_othr)) = 8 OR TRIM (v_je2acct_othr.acct_num_othr) IS NULL
THEN
v_mlac_mesg: = NULL;
ON THE OTHER
v_mlac_mesg: = 'check the length of a/c ml. "
dbms_output.put_line ('success7');
END IF;

INSERT INTO TB_XOP_JEMQ
(jemq_num,
prev_jemq,
ml_retail_account,
wcma_shares,
shares, wcma_taxes, tax_amt,
wcma_reimburse,
reimburse_amt,
name_first,
name_last, exer_type,
ml_sec_num, wcma_bulking, bulking_amt,
ivr_plan_num,
exer_dt, grant_dt,
user_id, source,
mlu_rowid, settle_dt,
exer_num, plan_type,
grant_num,
vc_trailer_desc, rsu_type
)
VALUES (Pk_Xop_Get_Jemqnum.fn_xop_get_jemqnum,
v_je2acct_othr.jemq_num,
v_je2acct_othr.acct_num_othr,
-2nd ml_retail_account
v_je2acct_othr.ml_retail_account,
-move old acct actions to 2nd acct above
v_je2acct_othr. Shares,
-It is ACTIONS
' ',
-wcma_taxes
0,
-tax_amt,
v_je2acct_othr.ml_retail_account,
-move old acct gl_amt to 2nd acct above
v_je2acct_othr.gl_amt *-1;
v_je2acct_othr.name_first,
v_je2acct_othr.name_last, v_je2acct_othr.
exer_type,
v_je2acct_othr.ml_sec_num, ' ',
-wcma_bulking,
0,
-bulking_amt,
v_je2acct_othr.ivr_plan_num,
v_je2acct_othr.exer_dt, v_je2acct_othr.
grant_dt,
v_je2acct_othr.user_id, 't',
-source
v_je2acct_othr.mlu_rowid, v_je2acct_othr.
settle_dt,
v_je2acct_othr.exer_num, v_je2acct_othr.
plan_type,
v_je2acct_othr.grant_num,
v_je2acct_othr.vc_trailer_desc,
v_je2acct_othr.
rsu_type
);

dbms_output.put_line ('success8');

END IF;
EXCEPTION
WHILE OTHERS
THEN
Pr_Xop_Log_Errors (' Code:')
|| NVL (v_mlac_mesg, SQLERRM)
|| "at".
|| USER
|| "to the sub exec in pop_je2acct_othr block '.
);
END;
dbms_output.put_line ('success9'); -end of start in the loop
END LOOP;

-VALIDATION;
EXCEPTION
WHILE OTHERS
THEN
Pr_Xop_Log_Errors (' Code:')
|| NVL (v_mlac_mesg, SQLERRM)
|| "at".
|| USER
|| "to the pk_xop_jemq.pop_je2acct_othr".
);

dbms_output.put_line ('success10');

END ;}


{ORA-06550: line 10, column 31:}
PL/SQL: ORA-00904: "FN_GET_SHARES": invalid identifier
ORA-06550: line 6, column 11:
PL/SQL: SQL statement ignored
ORA-06550: line 81, column 17:
PLS-00364: 'V_JE2ACCT_OTHR' use the loop index variable is not valid
ORA-06550: line 81, column 14:
{PL/SQL: statement ignored}

Hi friends, as I get two errors when executing code in the anonymous block, then how declare that 2 errors report article please guide me}

Tags: Database

Similar Questions

Maybe you are looking for