我写了以下包。当我编译它时,我收到以下错误:
PLS-00103: Encountered the symbol "("
Line 42 Column 66
这是“PROCEDURE p_fail”
我很无奈。我搜索了互联网,但没有找到任何对我有帮助的东西。有人有想法吗?
提前谢谢了。
CREATE OR REPLACE PACKAGE BODY boxi_rep.pck_jk_test AS
PROCEDURE p_main
IS
err_num NUMBER;
err_msg VARCHAR2 (200);
BEGIN
boxi_rep.pck_jk_test.p_start;
boxi_rep.pck_jk_test.p_truncate;
EXCEPTION
WHEN OTHERS
THEN
err_num := SQLCODE;
err_msg := SUBSTR (SQLERRM, 1, 200);
boxi_rep.pck_jk_test.p_fail (err_num, err_msg);
END;
PROCEDURE p_start
IS
BEGIN
/*Make start entry into Log_Jobs*/
DELETE FROM log_jobs
WHERE job_id = '1501'
AND TRUNC (datum) = TRUNC (SYSDATE)
AND end_timestamp IS NULL;
INSERT INTO log_jobs (job_id,
job_name,
datum,
start_timestamp)
VALUES ('1501',
'V$Re_Schedule TEST',
TRUNC (SYSDATE),
SYSDATE);
COMMIT;
END;
PROCEDURE p_fail (in_err_code IN NUMBER, in_err_msg IN VARCHAR2 (200))
IS
BEGIN
UPDATE log_jobs
SET end_timestamp = SYSDATE,
status = 'FAILED - ' || in_err_code || ' - ' || in_err_msg,
duration = TO_CHAR (TO_DATE ('00:00:00', 'hh24:mi:ss') + (SYSDATE - start_timestamp), 'hh24:mi:ss')
WHERE job_id = '1501'
AND end_timestamp IS NULL;
COMMIT;
END;
PROCEDURE p_truncate
IS
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE boxi_rep.jk_test';
END;
END pck_jk_test;