Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If by "SQL Window" you mean SQL*PLUS ,then to print(using <code>PRINT</code> command) the contents of a cursor, you need to declare a bind variable outside the PL/SQL block, assign a value to that bind variable inside the PL/SQL block by executing the block and then print the contents by using <code>PRINT</code> command:</p> <pre><code>SQL&gt; variable IO_CURSOR refcursor; SQL&gt; DECLARE 2 SOME_VAR_1 VARCHAR2(20); 3 SOME_VAR_2 VARCHAR2(20); 4 SOME_VAR_3 DECIMAL; 5 --IO_CURSOR SYS_REFCURSOR; 6 BEGIN 7 SOME_VAR_1 := 'test1'; 8 SOME_VAR_2 := 'test2'; 9 SOME_VAR_3 := 1; 10 --IO_CURSOR := NULL; -- no need to do that 11 Get_Analysis_Data(p_in_symbol_type =&gt; SOME_VAR_1, 12 p_in_symbol =&gt; SOME_VAR_2, 13 p_in_isr_id =&gt; SOME_VAR_3, 14 isr_main_view =&gt; :IO_CURSOR); 15 END; 16 / SQL&gt; print io_cursor; </code></pre> <p><strong>EDIT</strong>:</p> <p>To see the contents of a cursor in PL/SQL Developer, as one of the options, you could simply do the following:</p> <ol> <li>File\New\Test window</li> <li>Copy/Paste your anonymous PL/SQL block there. Prior to this remove <code>IO_CURSOR SYS_REFCURSOR;</code> variable declaration. There is no need of it. Also change <code>isr_main_view =&gt; IO_CURSOR</code> to <code>isr_main_view =&gt; :IO_CURSOR</code>. You need to use bind variable in this case.</li> <li>In the <code>variables window</code> at the bottom of the <code>test window</code> specify variable name of your ref cursor the contents of which you want to see (<code>IO_CURSOR</code> without preceding semicolon ) and select type <code>cursor</code>.</li> <li>Execute the block by pressing green triangle.</li> <li>After PL/SQL block is executed refer to the column <code>value</code> of the <code>variables window</code>. Press the button with ellipsis on it to see the contents of the ref cursor <code>IO_CURSOR</code>. </li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload