Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_OUTPUT and SYS_REFCURSOR

Re: DBMS_OUTPUT and SYS_REFCURSOR

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 11 Mar 2006 00:01:50 +0100
Message-ID: <4914129514728cctpc1g5903e15t9fr5p5@4ax.com>


On 10 Mar 2006 14:41:21 -0800, seanbrasher_at_gmail.com wrote:

>I have written a procedure that accepts a SYS_REFCURSOR as an input
>parameter and writes out the contents of that cursor using a FETCH and
>DBMS_OUTPUT. This works great as long as you know the structure of the
>cursor ahead of time.
>
>I need to write a function that will work when I do not know the
>structure of the SYS_REFCURSOR. That means that I do not know what kind
>of variables to FETCH the cursor into. Is there some way to fetch the
>cursor into an array or generic table object, and then loop through
>that object to do the DBMS_OUTPUT step?

http://asktom.oracle.com has a tool to dump the output of any select to a csv file. You could download it and modify it to suit your own needs.

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Mar 10 2006 - 17:01:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US