Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Newbie: how to excecute sp and package with result sets.
> 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
![]() |
![]() |