RE: Execute Store Procedure in Oracle

  • From: "Freeman, Donald" <dofreeman@xxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 4 Jun 2004 16:04:40 -0400

I think I follow what you want.  Here is a little example I copied from 
somewhere.

VARIABLE P_SER_NO NUMBER;
EXEC :P_SER_NO:=0;

PRINT p_ser_no

CREATE OR REPLACE PROCEDURE cf_ser_noformula (P_SER_NO IN OUT NUMBER) IS
BEGIN

P_SER_NO := NVL(P_SER_NO,0) + 1;


END;
/

EXEC cf_ser_noformula (:p_ser_no)

PRINT p_ser_no




> -----Original Message-----
> From: oracle-l-bounce@xxxxxxxxxxxxx
> [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Hamid Alavi
> Sent: Friday, June 04, 2004 3:32 PM
> To: 'Oracle-L (E-mail)
> Subject: Execute Store Procedure in Oracle
> 
> 
> List,
> 
> Is any body know how you can execute an store procedure from 
> SQLPLUS and get
> the output parameter from store procedure.
> I did EXECUTE sp_name(par1);   from sqlplus and get error 
> even call is the
> same, do I have to define any Variable or what?
> I can see the output thru the dbms_output but I need to see 
> the output from
> SQLPLUS
> 
> Thanks,
> 
> Hamid Alavi
> 
> Office           :  818-737-0526
> Cell phone  :  818-416-5095
> 
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
> put 'unsubscribe' in the subject line.
> --
> Archives are at //www.freelists.org/archives/oracle-l/
> FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
> 
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: