Re: HELP:How to execute a stored procedure in sqlplus???
Date: Thu, 28 May 1998 16:06:59 -0600
Message-ID: <356DE003.DBD7D055_at_earthlink.net>
HI,
First of all, it looks like you are trying to use REF CURSORS. This is [Quoted] what you need to do in this specific instance:
SQL> variable my_cursor REFCURSOR; SQL> exec test(my_cursor); SQL> print my_cursor;
By PRINTing my_cursor, you release the cursor holding memory. Also, you may want to consider placing your procedure in a package.
Good luck,
John M. Reed Jr.
Developer/DBA
violin wrote:
> Hello, I need some help!!
> I have created a stored procedure on Oracle 7.2,
> and then I logon sqlplus scott/tiger,
>
> But how to execute the procedure in SQL>
>
> My procedure is (been created already):
>
> CREATE OR REPLACE PROCEDURE TEST(CUR IN OUT CUR_RETURN.ATTN_CUR)
> IS
> BEGIN
> OPEN CUR FOR SELECT * FROM EMP;
> END;
>
> CREATE OR REPLACE PACKAGE CUR_RETURN IS
> TYPE ATTN_CUR IS REF CURSOR RETURN SCOTT.EMP%ROWTYPE;
> END;
>
> Could anyone help me? Thank you so much!
> please Cc to : violin_at_ms1.accmail.com.tw
Received on Fri May 29 1998 - 00:06:59 CEST