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: Out parameters in a procedure

Re: Out parameters in a procedure

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 4 Sep 2001 20:55:14 +0200
Message-ID: <tpa8tei30oig7a@news.demon.nl>

"Tony Walby" <tony.walby_at_bridgewatersystems.com> wrote in message news:3B951893.C6C26A6E_at_bridgewatersystems.com...
> Could someone please explain to me how out parameters work in a
> procedure. For example if I had the following:
> create or replace procedure con_time (v_sysdate in data, v_DD out
> number,
> v_HH out number) as
> begin
> select to_number(to_char(v_sysdate, 'DD' )) into v_DD from dual;
> select to_number(to_char(v_sysdate, 'HH24' )) into v_HH from dual;
> end;
> /
>
> Lets say this compiled without errors (There may be errors in this one)
> lets just say it compiled and I execute it how do I see the returned
> values ?
>
> Tony
>
>

declare
v_dd number;
v_hh number;
begin
con_time(sysdate, v_dd, v_hh);
dbms_output.put_line(v_dd||' '||v_hh);
end;
/

and that's all there is to it (provided serveroutput is on)

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Tue Sep 04 2001 - 13:55:14 CDT

Original text of this message

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