Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL function as a parameter to another PL/SQL function?
On 6 May 1997 21:15:14 GMT, "Brian Gastineau" <bgastine_at_giveblood.org> wrote:
>Can a PL/SQL function be passed into another PL/SQL function? My situation
>is that during conversion of data, several different tests will be run
>against each record, but the response to the true/false condition will be
>the same.
>
>Suggestions for workarounds would also be appreciated.
>
>Thanks,
>Brian Gastineau
>bgastine_at_giveblood.org
Yes, pl/sql functions may be used as IN parameters to other pl/sql functions, for example:
SQL> l
1 declare
2 function foo( x in varchar2 ) return varchar2
3 is
4 begin
5 return upper(x);
6 end foo;
7 function bar( y in varchar2 ) return varchar2
8 is
9 begin
10 return initcap( y );
11 end bar;
12 begin
13 dbms_output.put_line( bar( foo( 'Hello!' ) ) );
14* end;
SQL> /
Hello!
PL/SQL procedure successfully completed.
SQL>
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
![]() |
![]() |