I have created a basic stored procedure whose parameters are defined as:
REPLACE PROCEDURE STORED_PROCS.SP_UPDATE_SAP_CTRL_TABLE
(IN "in_DELTA_BUFFER_HR" integer,
IN "in_DB_NAME" VARCHAR(30) CHARACTER SET LATIN,
IN "in_TBL_NAME" VARCHAR(30) CHARACTER SET LATIN,
IN "in_NEXT_START_DTTM" VARCHAR(19) CHARACTER SET LATIN,
IN "in_NEXT_ID" VARCHAR(30) CHARACTER SET LATIN,
IN "in_FIRST_LOAD" VARCHAR(3) CHARACTER SET LATIN,
IN "in_EXTRACTOR_NAME" VARCHAR(30) CHARACTER SET LATIN,
OUT "out_DDL" VARCHAR(40000) CHARACTER SET LATIN)
When I call the SP with the following statement:
call stored_procs.sp_update_sap_ctrl_table(240,'meta_t','etl_sap_extr_ctrl','2012-03-24 00:00:00',' ','No','ZFAGLFLEXA',:outDDL);
I get the following error:
CALL Failed 3706: SP_UPDATE_SAP_CTRL_TABLE:Syntax error: expected something between a string or a Unicode character literal and the integer '240'.
I have tried just about everything but continue to get this same error message. Does anyone have any ideas as to what might be happening in this call or SP definition?
i don't think it's a problem of the input parameters, it looks like there's some malformed Dynamic SQL submitted within the SP's body.
Is there and "call dbc.sysexecsql" or "execute"?