Hi,
I was trying to create a function that accepts parameters, used to query a table. Those parameters are part of the query in the function.
Eg
create function (a varchar2,b varchar2)
return result number
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
as
(
exec 'select count(1) into result from table t1 where t1.col='||a||' and t2.col='||'b;
)
end;
But it says :-
As function was giving the error:- feature not supported: dynamic sql is not supported in the read only procedure/function
What could be the alternative for it?
If i need to create a procedure for the same. Below is the hurdle I'm facing again:-
Many of my functions have dynamic sql and multiple returns are there in the function.
So creating a procedure i would require a skip or GOTO statement. That also isn't provided in HANA.
Request you to help me with this.
Thanks,
Athrey