# Display refcursor in Toad 10.1.1.8

**URL:** <https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [June 10, 2011, 11:33am UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506 "2011-06-10T11:33:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![EdMund](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@EdMund](https://forums.toadworld.com/u/EdMund)\
**Post date:** [June 10, 2011, 11:33am UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/1 "2011-06-10T11:33:29Z")

</div>

INAPPLICATION VARCHAR2(32767);

PCURSOR\_SETTINGS PHXADM.APPLICATION\_SETTING.OUTPUTCURSOR;

INAPPLICATION := ‘CQH’;

PHXADM.APPLICATION\_SETTING.SETTINGSALL\_GET ( INAPPLICATION, :PCURSOR\_SETTINGS );

END;

It can’t be this hard. I am able to display the results of a refcursor when calling a stored proc in version 9.7.2.5, but not in 10.1.1.8. How can I get this to work in 10 like it works in 9??? Here’s what works in 9:

DECLARE BEGIN

---

<div class="post-metadata">

**Author:** ![HillbillyToad](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hillbillytoad/32/190_2.png) [@HillbillyToad](https://forums.toadworld.com/u/HillbillyToad)\
**Post date:** [June 10, 2011, 11:33am UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/2 "2011-06-10T11:33:29Z")

</div>

Browser, load up your procedure.

Right – Click \> Execute

Toad auto brings back the refcursor in a grid.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [June 10, 2011, 11:54am UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/3 "2011-06-10T11:54:33Z")

</div>

In the “Set Parameters” dialog, you have to click the “output  
options” toolbar button (the last one) to enable the loading of ref cursor  
results to grid.

---

<div class="post-metadata">

**Author:** ![EdMund](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@EdMund](https://forums.toadworld.com/u/EdMund)\
**Post date:** [June 10, 2011, 12:40pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/4 "2011-06-10T12:40:34Z")

</div>

That’s fine if I have a static procedure taking in no parameters, or I only care about testing one set of values, but if I want to test muliple inputs with different permutations, I then need to go through the same process numerous times. I’d like to have the code in an editor window so that I can simply change the input values. Can this be done?

---

<div class="post-metadata">

**Author:** ![GTDG](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gtdg/32/140_2.png) [@GTDG](https://forums.toadworld.com/u/GTDG)\
**Post date:** [June 10, 2011, 12:40pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/5 "2011-06-10T12:40:34Z")

</div>

Try something like this and when prompted for the variable, select CURSOR as the  
type. Also execute with and not .

DECLARE

INAPPLICATION VARCHAR2 ( 32767 );

PCURSOR\_SETTINGS PHXADM . APPLICATION\_SETTING . OUTPUTCURSOR ;

BEGIN

INAPPLICATION := ‘CQH’ ;

PHXADM . APPLICATION\_SETTING . SETTINGSALL\_GET ( INAPPLICATION ,  
:PCURSOR\_SETTINGS );

:rc0\_RetVal := PCURSOR\_SETTINGS ;

END;  
 ![image001.png](https://global.discourse-cdn.com/quest/original/2X/6/6c5710fdfdd30640b948ac8b90d65b7e90f87638.png)

---

<div class="post-metadata">

**Author:** ![GTDG](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gtdg/32/140_2.png) [@GTDG](https://forums.toadworld.com/u/GTDG)\
**Post date:** [June 10, 2011, 12:40pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/6 "2011-06-10T12:40:34Z")

</div>

Try something like this and when prompted for the variable, select CURSOR as the  
type. Also execute with and not .

DECLARE

INAPPLICATION VARCHAR2 ( 32767 );

PCURSOR\_SETTINGS PHXADM . APPLICATION\_SETTING . OUTPUTCURSOR ;

BEGIN

INAPPLICATION := ‘CQH’ ;

PHXADM . APPLICATION\_SETTING . SETTINGSALL\_GET ( INAPPLICATION ,  
:PCURSOR\_SETTINGS );

:rc0\_RetVal := PCURSOR\_SETTINGS ;

END;  
 ![image002.png](https://global.discourse-cdn.com/quest/original/2X/6/6eba5c2548b7d768365622106714fc91c37766fb.png)

---

<div class="post-metadata">

**Author:** ![EdMund](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@EdMund](https://forums.toadworld.com/u/EdMund)\
**Post date:** [June 10, 2011, 1:33pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/7 "2011-06-10T13:33:08Z")

</div>

Yes, I’ve tried that but the type options do not include “cursor”.

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [June 13, 2011, 12:28pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/8 "2011-06-13T12:28:31Z")

</div>

I did not get an answer for my question earlier, so I will try this topic that  
looks very close.

How can I view the value of the “out” parameter in TOAD?

begin  
pk\_idw\_recon.pr\_recon\_results(p\_run\_id =\> :p\_run\_id,  
p\_summary\_report\_sql =\> :p\_summary\_report\_sql);  
end;

The second parameter is “out” type clob, I would like to run the  
procedure and see the result. I do not want to declare a variable and use  
dbms\_output which does work. Please advise. Other oracle tools (like PL/SQL  
Developer let you do it).

Many thanks,

George  
 ![image001.jpeg](https://global.discourse-cdn.com/quest/original/1X/e8288ef7bf69daaab6959f752b25ca292478b911.jpeg)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [June 13, 2011, 12:28pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/9 "2011-06-13T12:28:31Z")

</div>

I did not get an answer for my question earlier, so I will try this topic that  
looks very close.

How can I view the value of the “out” parameter in TOAD?

begin  
pk\_idw\_recon.pr\_recon\_results(p\_run\_id =\> :p\_run\_id,  
p\_summary\_report\_sql =\> :p\_summary\_report\_sql);  
end;

The second parameter is “out” type clob, I would like to run the  
procedure and see the result. I do not want to declare a variable and use  
dbms\_output which does work. Please advise. Other oracle tools (like PL/SQL  
Developer let you do it).

Many thanks,

George  
 ![image001.png](https://global.discourse-cdn.com/quest/original/2X/6/6c5710fdfdd30640b948ac8b90d65b7e90f87638.png)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [June 13, 2011, 12:28pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/10 "2011-06-13T12:28:31Z")

</div>

I did not get an answer for my question earlier, so I will try this topic that  
looks very close.

How can I view the value of the “out” parameter in TOAD?

begin  
pk\_idw\_recon.pr\_recon\_results(p\_run\_id =\> :p\_run\_id,  
p\_summary\_report\_sql =\> :p\_summary\_report\_sql);  
end;

The second parameter is “out” type clob, I would like to run the  
procedure and see the result. I do not want to declare a variable and use  
dbms\_output which does work. Please advise. Other oracle tools (like PL/SQL  
Developer let you do it).

Many thanks,

George  
 ![image002.png](https://global.discourse-cdn.com/quest/original/2X/6/6eba5c2548b7d768365622106714fc91c37766fb.png)

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [June 13, 2011, 1:30pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/11 "2011-06-13T13:30:43Z")

</div>

it’s always kind of bugged me that output parameters never work in spool  
sql. I’ll see if I can fix that.

I don’t know of any way in Toad to do this already other than dbms\_output  
or debugging  
 ![image001.png](https://global.discourse-cdn.com/quest/original/2X/6/6c5710fdfdd30640b948ac8b90d65b7e90f87638.png)

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [June 13, 2011, 1:30pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/12 "2011-06-13T13:30:43Z")

</div>

it’s always kind of bugged me that output parameters never work in spool  
sql. I’ll see if I can fix that.

I don’t know of any way in Toad to do this already other than dbms\_output  
or debugging  
 ![image002.png](https://global.discourse-cdn.com/quest/original/2X/6/6eba5c2548b7d768365622106714fc91c37766fb.png)

---

<div class="post-metadata">

**Author:** ![HillbillyToad](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hillbillytoad/32/190_2.png) [@HillbillyToad](https://forums.toadworld.com/u/HillbillyToad)\
**Post date:** [June 13, 2011, 1:33pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/13 "2011-06-13T13:33:44Z")

</div>

Yeah, if you’re talking about the ‘test’ feature in PL/SQL  
Developer, we don’t do that

We can capture a collection or a REFCURSOR that’s returned, but nothing  
automatic for your example.  
 ![image002.png](https://global.discourse-cdn.com/quest/original/2X/6/6eba5c2548b7d768365622106714fc91c37766fb.png)

---

<div class="post-metadata">

**Author:** ![HillbillyToad](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hillbillytoad/32/190_2.png) [@HillbillyToad](https://forums.toadworld.com/u/HillbillyToad)\
**Post date:** [June 13, 2011, 1:33pm UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/14 "2011-06-13T13:33:44Z")

</div>

Yeah, if you’re talking about the ‘test’ feature in PL/SQL  
Developer, we don’t do that

We can capture a collection or a REFCURSOR that’s returned, but nothing  
automatic for your example.  
 ![image001.png](https://global.discourse-cdn.com/quest/original/2X/6/6c5710fdfdd30640b948ac8b90d65b7e90f87638.png)

---

<div class="post-metadata">

**Author:** ![Kirankumar](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@Kirankumar](https://forums.toadworld.com/u/Kirankumar)\
**Post date:** [December 4, 2012, 6:13am UTC](https://forums.toadworld.com/t/display-refcursor-in-toad-10-1-1-8/10506/15 "2012-12-04T06:13:00Z")

</div>

we can see the cursor result in Toad by using like this

exec procedure\_name(param1,param2,:cv1);

run above command in toad editor

It will give you a popup of variables.

In that select type **cursor** for :cv1
