Yes this is possible but I believe you will need the debugger option according
to the Toad Help.
Here is an example - I created this package....
create or replace package mypkg as
TYPE csr IS REF CURSOR;
--
procedure myProc(myCsr out csr);
end;
create or replace package body mypkg as
procedure myProc(myCsr out csr) is
begin
open myCsr for
select * from scott.emp;
end myProc;
end;
Execute From the Editor.
In the Editor for the Package Body I place the cursor in the Proc that I want to
run and click the Set Parameter Icon, the icon that looks like "(...)". On that
window click the "Options" button and you will see a REF CURSOR section. Select
the last radio button "Load into Grid...." click OK and OK again. Now click the
Lightening Bolt. After termination you should see your results in a grid on the
REF CURSOR tab at the bottom of the editor.
Execute from the Schema Browser.
Select the proc you want to run and click the lightening bolt. Do the same
thing on the Set Parameter window as above. After execution the results should
be displayed in the REF CURSOR grid.
Ed
[TeamT]
-----Original Message-----
From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On Behalf Of solmyr72
Sent: Thursday, December 28, 2006 5:53 AM
To: ***@yahoogroups.com
Subject: [toad] Calling a stored procedure that returns a cursor
Hi,
I'm new to Toad.
I have a stored procedure which returns a 'ref cursor' as an 'out'
parameter.
Is it possible to call such a procedure from TOAD, and make TOAD show the
table data which is represented by this cursor ?
For example, suppose my procedure is:
TYPE rf_cursor IS REF CURSOR;
procedure myProcedure(crs OUT ref_cursor) IS
BEGIN
open rf_cursor for
select * from PRODUCTS;
END
For this example, i'd like to invoke this procedure from TOAD, and see my
entire PRODUCTS table (because that's what my cursor points to).
Thanks very much !
--
View this message in context:
http://www.nabble.com/Calling-a-stored-procedure-that-returns-a-cursor-tf2889770
.html#a8073225
Sent from the Oracle TOAD mailing list archive at Nabble.com.
Questions? Try the on-line FAQ:
http://asktoad.com/DWiki/doku.php?id=faq:questions
Do you know about the other TOAD Yahoo Message Boards? Go here to find out more
- http://www.toadsoft.com/maillist.htm
Yahoo! Groups Links
**************************************************************************
Notice of Confidentiality: This e-mail communication and the attachments hereto, if any, are intended solely
for the information and use of the addressee(s) identified above and may contain information which is legally
privileged and/or otherwise confidential. If a recipient of this e-mail communication is not an addressee (or an
authorized representative of an addressee), such recipient is hereby advised that any review, disclosure,
reproduction, re-transmission or other dissemination or use of this e-mail communication (or any information
contained herein) is strictly prohibited. If you are not an addressee and have received this e-mail communication
in error, please advise the sender of that circumstance either by reply e-mail or by telephone at (407) 384-8818
immediately delete this e-mail communication from any computer and destroy all physical copies of same.
Replies Filtered: Any incoming e-mail reply to this communication will be electronically filtered for "spam"
and/or "viruses." That filtering process may result in such reply being quarantined (i.e., potentially not received
at our site at all) and/or delayed in reaching us. For that reason, we cannot guarantee that we will receive your
reply and/or that we will receive it in a timely manner. Accordingly, you should consider sending communications
to us which are particularly important or time-sensitive by means other than e-mail.
**************************************************************************