CREATE OR REPLACE PACKAGE BODY BAS_NUMB_UPD AS
PROCEDURE BAS_NUM_UPDN AS
CURSOR cur IS
SELECT DISTINCT o.obj_id,LTRIM(substr(convert_171_to_711(cp.T_C_CP),1,7),'0') bas_n
FROM t_obj o, mat_tea_rel mpr, coorg_tea cp
WHERE o.obj_type = 'Resin'
AND o.obj_id = mpr.obj_id
AND mpr.p_k_id = cp.p_k_id;
l_b_num_attr_id number(10) := get_attribute_id('Ba Nu');
flag1 VARCHAR2(10);
BEGIN
FOR x IN cur LOOP
dbms_output.put_line(x.obj_id||'contains b n'||x.bas_n);
SELECT flag INTO flag1
FROM t_xc_s_values
WHERE attr_id = l_b_num_attr_id
AND Obj_id = x.obj_id
AND VALUE = x.bas_n;
EXCEPTION
WHEN NO_DATA_FOUND THEN
flag1 :='Nothing';
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in PROCEDURE');
END;
IF flag1 = 1 THEN
dbms_output.put_line('flag equal to one');
ELSE
INSERT INTO t_xc_s_values (obj_id, at_id, VALUE,)
VALUES (x.obj_id, l_b_num_attr_id, x.bas_n);
END IF;
END LOOP;
END;
END BAS_NUM_UPDN;
END BAS_NUMB_UPD;
这些是错误
错误(28,1):PLS-00103:在预期以下情况之一时遇到符号“EXCEPTION”:begin case declare end exit for goto if loop mod null pragma raise return select update while with << close current delete fetch lock insert打开回滚
保存点设置 sql 执行提交 forall 合并管道错误(35,1):PLS-00103:在预期以下情况之一时遇到符号“IF”:结束而不是编译指示最终实例化顺序覆盖静态成员构造函数映射
错误(47,3):PLS-00103:在预期以下情况之一时遇到符号“END”:;