oracle 报psl-00103 错 请大神帮帮忙 跪求
CREATE OR REPLACE PROCEDURE RP_TRANSFER001PROC_GENERATE(p_pi_id NUMBER) IS
/* Alley init 20110315
功能同调拨汇总报表一样
*/
v_sql1 VARCHAR2(4000);
v_sql2 VARCHAR2(4000);
v_sql3 VARCHAR2(4000);
v_sql4 VARCHAR2(4000);
v_sql5 VARCHAR2(4000);
v_date VARCHAR2(80);
v_datebegin VARCHAR2(8);
v_dateend VARCHAR2(8);
BEGIN
-- raise_application_error(-20201, p_pi_id);24338
DELETE FROM RP_TRANSFER001PROC a
WHERE a.ad_pi_id = p_pi_id;
COMMIT;
--依次获取界面查询条件参数
SELECT t.info
INTO v_date
FROM ad_pinstance_para t
WHERE t.NAME = 'OUTINDATE' AND t.ad_pinstance_id = p_pi_id;
IF instr(v_date, '<=') = 0 THEN
SELECT substr(v_date, 22, 8), substr(v_date, 35, 8)
INTO v_datebegin, v_dateend
FROM dual;
ELSE
v_datebegin := 0;
SELECT substr(TRIM(v_date), 13, 8)
INTO v_dateend
FROM dual;
END IF;
SELECT t.info
INTO v_sql1
FROM ad_pinstance_para t
WHERE t.NAME = 'ORIGSTORE' AND t.ad_pinstance_id = p_pi_id;
SELECT t.info
INTO v_sql2
FROM ad_pinstance_para t
WHERE t.NAME = 'DESTSTORE' AND t.ad_pinstance_id = p_pi_id;
SELECT t.info
INTO v_sql3
FROM ad_pinstance_para t
WHERE t.NAME = 'PRODUCT' AND t.ad_pinstance_id = p_pi_id;
SELECT t.info
INTO v_sql4
FROM ad_pinstance_para t
WHERE t.NAME = 'ASI' AND t.ad_pinstance_id = p_pi_id;
SELECT t.info
INTO v_sql5
FROM ad_pinstance_para t
WHERE t.NAME = 'DOCNO' AND t.ad_pinstance_id = p_pi_id;
--插入数据
select to_char(OUTTIME,'yyyymmdd')