我有以下编译得很好的sproc:
CREATE OR REPLACE PROCEDURE SSACHDEV.SyncTeleappWithClientinfo
as
mine varchar2(1);
v_teleCaseNbr number;
v_cashwithappyn varchar2(1);
CURSOR TeleAppCursor
is
Select
distinct casenbr, cashwithappyn
from TeleApp;
BEGIN
dbms_output.put_line('begin');
open TeleAppCursor;
LOOP
fetch TeleAppCursor into v_teleCaseNbr, v_cashwithappyn;
EXIT when TeleAppCursor%NOTFOUND; -- this one has the problem
Select cashwithappyn into mine from ClientInfo where casenbr = v_teleCaseNbr and trim(cashwithappyn) is null;
END LOOP;
dbms_output.put_line('end');
END;
但是当我尝试使用以下命令运行它时:
BEGIN
SSACHDEV.SYNCTELEAPPWITHCLIENTINFO;
END;
我收到以下错误:
ORA-01403: no data found
ORA-06512: at "SSACHDEV.SYNCTELEAPPWITHCLIENTINFO", line 21
ORA-06512: at line 2
有谁知道为什么?或者我能做些什么来避免这些问题?