【问题标题】:ORA-06550: line 15, column 1: PLS-00103: Encountered the symbol "LOOP" when expecting one of the following:ORA-06550:第 15 行,第 1 列:PLS-00103:在预期以下情况之一时遇到符号“LOOP”:
【发布时间】:2016-10-16 17:28:06
【问题描述】:

我收到以下错误:

循环

*

第 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;

/

【问题讨论】:

    标签: plsql cursor


    【解决方案1】:

    我想你只是忘记了 ;在OPEN C1之后。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-03
      • 2018-11-04
      • 2018-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多