Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Function Calls
Bullseye wrote:
> How could I use this method if I had to pass parameters IN and OUT?
SQL> create or replace procedure yet_another_proc( c1 IN OUT varchar2 )
is
2 begin
3 c1 := InitCap( c1 );
4 end;
5 /
Procedure created.
SQL> SQL> set serveroutput on SQL> declare 2 s varchar2(20); 3 4 procedure W( cline varchar2 ) is 5 begin 6 DBMS_OUTPUT.put_line( cline ); 7 end; 8 begin 9 s := 'FOO'; 10 11 W( 's is set to ['||s||']' ); 12 W( 'doing a dynamic call to yet_another_proc' ); 13 14 EXECUTE IMMEDIATE 'begin yet_another_proc( :BINDVAR ); end;' 15 USING IN OUT s; 16 17 W( 'dynamic call done' ); 18 W( 's is now ['||s||']' );
PL/SQL procedure successfully completed.
SQL> See PL/SQL Reference Guide for details. On-line copies of Oracle documentation at http://tahiti.oracle.com
-- BillyReceived on Mon Jun 06 2005 - 07:49:02 CDT