CREATE OR REPLACE PROCEDURE XYGMES.proc_sm_rpt_cbjs_calc (
v_sgid IN VARCHAR2,
v_mat_cat IN VARCHAR2,
v_mat_caltype IN VARCHAR2,
v_sg_weight IN NUMBER,
inmonthid IN VARCHAR2,
errmsg OUT VARCHAR2
)
AS
r_mat sm_rpt_mat_seq%ROWTYPE;
v_price NUMBER;
V_CAT_SL NUMBER :=0;
V_CAT_FEE NUMBER :=0;
V_CAT_PER_SL NUMBER :=0;
V_CAT_PER_FEE NUMBER :=0;
V_SL NUMBER;
V_FEE NUMBER;
V_PER_SL NUMBER;
V_PER_FEE NUMBER;
V_SG_SHOW VARCHAR2(50);
V_MAT_SEQ NUMBER;
BEGIN
IF v_mat_caltype=1
THEN
...........
ELSE
INSERT INTO MARKCT(ct,a,b,c,d,E) --这一句特地用来标示的语句执行,但是从下一句for