I need to call a function dynamically (say handler() ) in PL/SQL function which returns a Nested Table.
Code:
BEGIN
...
v_function := 'handler'; //shown like this of simplicity.
EXECUTE IMMEDIATE 'BEGIN :result := ' || v_function || '(...); END;'
USING OUT v_error_msg;
... //process v_error_msg
END;
and the handler() specification:
TYPE t_error_msgs IS TABLE OF VARCHAR2(2000);
FUNCTION handle (...)
RETURN t_error_msgs;
Issue is I get PL-00457:expressions have to be of SQL types while compiling as execute immediate wont allow non-sql types to be binded.
Is there any way around ?