如題:
描述:存盤程序片段
-- step1 游標回圈
begin
declare v_dic_code varchar(50);
declare v_dic_name varchar(50);
declare v_num int;
-- 宣告cur1
declare cur1 cursor for
select DIC_CODE,DIC_NAME from S_PB_sysdicinfo where (PDIC_CODE LIKE 'X1001%' OR PDIC_CODE LIKE 'X1002%') ; -- 檢查型別
open cur1;
fetch cur1 into v_dic_code, v_dic_name;
while (SQLCODE = 0) do
-- step2 統計數量
select
count(1)
into
v_num
from C_SM_HDINFO sm01
where 1=1
and sm01.IS_ACTIVE = '1'
and sm01.hd_type_self = v_dic_code
and left(CHECK_DATE,4) = v_current_year
;
-- 插入rs
insert into session.tmp_tab1(hd_type_self, hd_type_self_name, num)
values(v_dic_code, v_dic_name, v_num);
fetch cur1 into v_dic_code, v_dic_name;
end while;
close cur1;
end;
在toad除錯程序導致服務例外關閉!
疑問1:存盤程序如何導致服務例外關閉?有哪些原因和情況?還請各位壇友解惑
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/96687.html
標籤:其他數據庫
上一篇:mongodb 時間聚合分組
下一篇:關于oracle觸發器問題
