Error:
(specific name "SQL12101608103 2000") is defined with the MODIFIES SQL DATA option, which is not valid in the context where the routine is invoked. SQLSTATE=51034
Procedure:
-----------------
Function:
-----------
select ccdradm.test_fu nc(5) from sysibm.dual
------------
Error:
51034(-740)[IBM][CLI Driver][DB2/SUN64] SQL0740N Routine "TEST_FUNC" (specific name "SQL12101608305 1700") is defined with the MODIFIES SQL DATA option, which is not valid in the context where the routine is invoked. SQLSTATE=51034
(0.58 secs)
Pls suggest to solve the issue
(specific name "SQL12101608103 2000") is defined with the MODIFIES SQL DATA option, which is not valid in the context where the routine is invoked. SQLSTATE=51034
Procedure:
Code:
CREATE PROCEDURE test_proc (IN p1 INT, OUT p3 INT) LANGUAGE SQL BEGIN SET p3 = 2 * p1; END
Function:
Code:
CREATE FUNCTION test_func(v_1 int) RETURNS varchar(1000) LANGUAGE SQL MODIFIES SQL DATA BEGIN DECLARE v_2 varchar(1000); call test_proc(v_1,v_2); return v_2; END @
select ccdradm.test_fu nc(5) from sysibm.dual
------------
Error:
51034(-740)[IBM][CLI Driver][DB2/SUN64] SQL0740N Routine "TEST_FUNC" (specific name "SQL12101608305 1700") is defined with the MODIFIES SQL DATA option, which is not valid in the context where the routine is invoked. SQLSTATE=51034
(0.58 secs)
Pls suggest to solve the issue
Comment