hi all,
using dynamic sql i want to call a function returning a number
help please
Printable View
hi all,
using dynamic sql i want to call a function returning a number
help please
See http://download-west.oracle.com/docs...ynam.htm#13131Code:scott@oracle> create or replace function twice(a in number) return number
2 as
3 begin
4 return (a*2);
5 end;
6 /
Function created.
scott@oracle> declare
2 b number;
3 begin
4 execute immediate 'begin :b:=twice(7); end;' using out b;
5 dbms_output.put_line(b);
6 end;
7 /
14
PL/SQL procedure successfully completed.
here is another one that i got after posting
declare
i number(10);
begin
execute immediate 'select twice(7) from dual' into i;
end;
/