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: executing a stored procedure through SQL PLUS

Re: executing a stored procedure through SQL PLUS

From: Suresh Bhat <suresh.bhat_at_mitchell-energy.com>
Date: Wed, 17 Jun 1998 17:23:13 GMT
Message-ID: <01bd9a24$7cf0d4e0$a504fa80@mndnet>


Here is a sample, I have not tested it out but should be pretty close:

Procedure CREATE_ANALYSIS is a procedure in a package named PKG_EFM_FA_PROCESS_DATA In SQL*Plus:                 

spool x.x
 DECLARE

 var1	varchar2(20)
 no1    number;                                                            
       
 BEGIN
 set serveroutput on size 1000000                                
 execute pkg_efm_fa_process_data.create_analysis(var1, no1) dbms_output.put_line(var1||' '|| no1);  EXCEPTION
 when other then

     null;
 END;
.
/
spool off

Another way is:

set serveroutput on

variable conts varchar2(2);
variable begs  varchar2(20);
variable ends  varchar2(20);

begin
:conts := null;
:begs  := null;
:ends  := null;

pkg_efm_fa_process_data.get_contract_date_info(11000, to_date('01-feb-97 00:00:00','dd-mon-yy hh24:mi:ss'),:conts,:begs,:ends); end;
/
print conts
print begs
print ends

suresh.bhat_at_mitchell-energy.com

Abeeda_Mohammed_at_xn.xerox.com wrote in article <6lm3im$e5v$1_at_nnrp1.dejanews.com>...
> Hello, How do I execute a stored procedure through SQL *PLUS with IN and
OUT
> parameters. Any example would be helpful.
>
> Thank you,
>
> Abeeda
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
Received on Wed Jun 17 1998 - 12:23:13 CDT

Original text of this message

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