Hello FME Experts,
I need some help in figuring out how to use a return value from a stored function in oracle.
Stored function:
create or replace FUNCTION TestReturnFunction(inputval in varchar2)
return NUMBER
IS
countnum number:=0;
BEGIN
IF( countnum = 0 ) THEN select count(*) into countnum from TestTable where MyVal is not null and TestID=inputval; END IF; IF( countnum >= 1 ) THEN RETURN (0); ELSE RETURN (1); END IF; END TestReturnFunction;
How I call it:FME_SQL_DELIMITER / declare result1 number; begin result1 := TestReturnFunction('TestThisValue');
end;
While this runs successfully, no value is returned in the "result" section of sqlexecutor. Any help on how to get the output would be greatly appreciated!