【发布时间】:2014-03-24 07:56:16
【问题描述】:
由于 continue 关键字不起作用,因为以下原因,我试图通过调用相同的过程并将记录中的下一个值传递给它来解决这个问题 那是正确的方法吗?
ORA-06550:第 1 行,第 26 列:PLS-00201:标识符“CONTINUE”必须是 声明 ORA-06550:第 1 行,第 26 列:PL/SQL:语句被忽略
declare
cust_id info.CUSTOMER_ID@prod%type;
V_CUST_INFO_CUSTOMER_ID FEB_PRD_14_VIEW.CUST_INFO_CUSTOMER_ID@rtx%type;
V_INITIAL_START_TIME_TIMESTAMP FEB_PRD_14_VIEW.INITIAL_START_TIME_TIMESTAMP@rtx%type;
cursor rated_rejectes_calls_cursor is
select S_P_NUM,CALL_START_TIME
from fi_sdine.rejected_calls_87@prod
where UPPER (STATUS)='RATED';
begin
for rated_rejectes_calls_rec in rated_rejectes_calls_cursor
loop
if (rated_rejectes_calls_rec.S_P_NUM is not null) then
begin
select CUSTOMER_ID into cust_id from bmh.info@prod where dn_num=rated_rejectes_calls_rec.S_P_NUM;
if (V_CUST_INFO_CUSTOMER_ID is null ) then
select CUST_INFO_CUSTOMER_ID, INITIAL_START_TIME_TIMESTAMP into V_CUST_INFO_CUSTOMER_ID,V_INITIAL_START_TIME_TIMESTAMP
from FI_MASAAD.FEB_PRD_14_VIEW@rtx a
where CUST_INFO_CUSTOMER_ID =cust_id
and INITIAL_START_TIME_TIMESTAMP=rated_rejectes_calls_rec.CALL_START_TIME
group by CUST_INFO_CUSTOMER_ID,INITIAL_START_TIME_TIMESTAMP;
DBMS_OUTPUT.PUT_LINE('null NOT Found '||V_CUST_INFO_CUSTOMER_ID);
end if;
dbms_output.put_line('The customer ID for S_P_NUM '||rated_rejectes_calls_rec.S_P_NUM||' is '||cust_id|| ' and the call start time is '||rated_rejectes_calls_rec.CALL_START_TIME||' has been found' );
dbms_output.put_line('The customer ID'||V_CUST_INFO_CUSTOMER_ID||' and call start is '||V_INITIAL_START_TIME_TIMESTAMP);
exception
when no_data_found then
dbms_output.put_line('The Customer ID NOT FOUND FOR S_P_NUM '|| rated_rejectes_calls_rec.S_P_NUM);
--contunie;
-- recall procedure and pass the next value to same procedure ?
exec check_rejected_CDRs(rated_rejectes_calls_rec.nextval);
end;
end if;
end loop;
end;
end check_rejected_CDRs;
【问题讨论】:
-
我在他的代码中没有看到
CONTINUE这个词,我不明白你的问题。 -
代码更新它...因为我用召回程序替换它