FN_UPD
正在调用CURSOR_SELECT
,但我不断收到错误消息。
"Error(11,12): PLS-00201: identifier 'V_RC' must be declared"
when i try to add the DECLARE , it will throw other error.
create or replace procedure FN_UPD
( COL_A in varchar2 ,V_INPUT_TYP in varchar2)
IS
v_rc sys_refcursor;
begin
v_rc := CURSOR_SELECT(COL_A, V_INPUT_TYP);
for f in v_rc
loop
if (f.rownum = 1) then
update TB_TARGET SUMM set ENEX_ID = F.SNS_KEY, LAST__DT = F.VEH_ENT_EXT_ON
where V_NUM = COL_A and INPUT_TYP = V_INPUT_TYP;
else
update TB_TARGET SUMM set ENEX2_ID = f.sns_key, LAST2__DT = f.veh_ent_ext_on
WHERE V_NUM = COL_A and INPUT_TYP = V_INPUT_TYP;
end if;
end loop;
commit;
--close C1;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20001,'遇到错误 - '||SQLCODE||' -ERROR- '||SQLERRM); 结尾; /
遇到其他错误
"Error(10,12): PLS-00221: 'V_RC' is not a procedure or is undefined"
如果我更新到以下
create or replace procedure FN_UPD
( COL_A in varchar2 ,V_INPUT_TYP in varchar2) is
v_rc sys_refcursor;
begin
v_rc := CURSOR_SELECT(COL_A, V_INPUT_TYP);