我收到以下错误:
LOOP
*
第15行的错误:
ORA-06550:第15行,第1栏:
PLS-00103:当遇到以下情况之一时遇到符号“LOOP”:. (%;代表
符号“;在”LOOP“之前插入以继续。
ORA-06550:第39行,第1栏:
PLS-00103:遇到符号“CLOSE”
DECLARE
CURSOR C1
IS
select B.PTN_STATUS,B.SUBSCRIBER_NO,A.PTN from DVC_REFRESH_Q_TEMP A, subscriber_rsource B where A.PTN=B.PTN;
ptn_sts DVC_REFRESH_Q_TEMP.PTN_STATUS%TYPE;
ptn DVC_REFRESH_Q_TEMP.PTN%TYPE;
subs_no DVC_REFRESH_Q_TEMP.SUBSCRIBER_NO%TYPE;
BEGIN
OPEN C1
LOOP
FETCH C1 into ptn_sts,subs_no,ptn;
EXIT when C1%notfound;
update DVC_REFRESH_Q_TEMP set PTN_STATUS=ptn_sts where PTN=ptn;
if ptn_sts='A' then
update DVC_REFRESH_Q_TEMP set SUBSCRIBER_NO=subs_no where PTN=ptn;
else
dbms_output.put_line('Subscriber number will be empty');
end if;
INSERT into dvc_refresh_q(dvc_name,subscriber_no,nms_ftr_ref,sys_update_date,operator_id,application_id,status)
select dvc_name,subscriber_no,nms_ftr_ref,sysdate,87952,'DRFSCR',null from dvc_refresh_q_temp where PTN_STATUS='A';
END LOOP;
CLOSE C1;
END;
/
答案 0 :(得分:0)
我想你只是忘记了;在OPEN C1
之后。