Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Execute Store Procedure in Oracle
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_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org]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_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Fri Jun 04 2004 - 15:02:58 CDT