Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Function Calls

Re: PL/SQL Function Calls

From: Billy <vslabs_at_onwe.co.za>
Date: 6 Jun 2005 05:49:02 -0700
Message-ID: <1118062142.689592.138460@g49g2000cwa.googlegroups.com>


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||']' );

 19 end;
 20 /
s is set to [FOO]
doing a dynamic call to yet_another_proc dynamic call done
s is now [Foo]

PL/SQL procedure successfully completed.

SQL> See PL/SQL Reference Guide for details. On-line copies of Oracle documentation at http://tahiti.oracle.com

--
Billy
Received on Mon Jun 06 2005 - 07:49:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US