SET SCHEMA = "ETL";
--drop PROCEDURE "ETL"."SP_TMP_CUS_TRUN";
CREATE PROCEDURE "ETL"."SP_TMP_CUS_TRUN" ( IN "P_RESULT" VARCHAR(5) )
SPECIFIC "SP_TMP_CUS_TRUN"
LANGUAGE SQL
NOT DETERMINISTIC
EXTERNAL ACTION
MODIFIES SQL DATA
CALLED ON NULL INPUT
INHERIT SPECIAL REGISTERS
BEGIN
call sysproc.admin_cmd('db2 connect to test_db');
call sysproc.admin_cmd('db2 import from /dev/null of del replace into etl.t_tmp_cus');
END;
GRANT EXECUTE ON PROCEDURE "ETL"."SP_TMP_CUS_TRUN"( VARCHAR(5) ) TO USER "TESTINST" WITH GRANT OPTION;
-----------------------------
컴파일은 잘되는데요..
실행시 에러가 발생합니다..어떻게 고쳐야하나요?
ㅠㅠ 꼭 좀 알려주세요.
ERROR [42601] [IBM][DB2/AIX64] SQL0104N An unexpected token "db2" was found following "BEGIN-OF-STATEMENT". Expected tokens may include: "ADD". SQLSTATE=42601
|