# How to display a sys\_refcursor data in TOAD's Data Grid

**URL:** <https://forums.toadworld.com/t/how-to-display-a-sys-refcursor-data-in-toads-data-grid/11276>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [October 5, 2012, 9:52am UTC](https://forums.toadworld.com/t/how-to-display-a-sys-refcursor-data-in-toads-data-grid/11276 "2012-10-05T09:52:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arzamm](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@arzamm](https://forums.toadworld.com/u/arzamm)\
**Post date:** [October 5, 2012, 9:52am UTC](https://forums.toadworld.com/t/how-to-display-a-sys-refcursor-data-in-toads-data-grid/11276/1 "2012-10-05T09:52:42Z")

</div>

Please i need help. (I SEARCHED A lot and get more confused . )

I use Toad 9.7.25 and i made this procedure (in a package)

PROCEDURE ReportaCC(pfcorte IN DATE, lcursor IN OUT SYS\_REFCURSOR)  
IS  
BEGIN  
OPEN lcursor FOR  
select c1, c3, c3 from table1 where hdate = pfcorte;  
close lcursor;  
END;  
In toad’s sql editor i´d like execute that procedure and show the cursor results in toad’s datagrid:

— I WANT THE NEXT CODE CAN EXECUTE IN TOAD’S SQL EDITOR.

```
DECLARE
  PFCORTE DATE;
  LCURSOR SYS_REFCURSOR;
BEGIN

    PFCORTE := '31/08/2012';
    -- LCURSOR := NULL; -- Modify the code to initialize this parameter

    mypaq.REPORTACC( TO_DATE(PFCORTE,'DD/MM/YYYY') , LCURSOR );

    :to_grid := LCURSOR;

    COMMIT;

END;

```

When i execute the script (F9), and set the variable :to\_grid type cursor, i get the next error:

“ORA-24338: statement handle not executed”

What can be the problem

Thanks in advance.
