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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Newbie: how to excecute sp and package with result sets.

Re: Newbie: how to excecute sp and package with result sets.

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Sun, 25 Mar 2001 08:03:03 -0800
Message-ID: <3ABE16B7.B5597114@exesolutions.com>

> Could anyone kindly brief me how to execute the package and stored
> procedure.
>
> My code is :-
>
> PACKAGE TEST1
> IS
> TYPE OUTPARM123 IS REF CURSOR;
> END;
>
> PACKAGE BODY TEST1
> AS
> TYPE OUTCUR IS REF CURSOR;
> PROCEDURE RETURNDATA(O_CURSOR OUT OUTCUR)
> AS
> BEGIN
> OPEN O_CURSOR FOR SELECT * FROM EQUIPMENT;
> END;
> BEGIN
> NULL;
> END;
>
> I've created another SP with code:-
>
> AS
> CURSOR TMP IS (SELECT * FROM EQUIPMENT);
> BEGIN
> OPEN TMP;
> END;
There is much about what you wrote that I don't think will run. But to answer your question ... to execute a stored procedure in a package you type:

SQL> EXEC package_name dot procedure_name

And then hit the Enter key.

Daniel A. Morgan Received on Sun Mar 25 2001 - 10:03:03 CST

Original text of this message

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