If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Return A Clob in a Ref Cursor

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-29-03, 14:04
PaulS PaulS is offline
Registered User
 
Join Date: Oct 2003
Posts: 6
Red face Return A Clob in a Ref Cursor

Is there anyway you can select a clob datatype from dual in Oracle?

The reason i want to do this is that I have a Store Proc that is using the dbms_xmlgen package to generate XML. The generated XML is then stored in a CLOB which i then want to pass out of the Stored Proc as part of a Ref Cursor. This is what i have tried:

Code:
  PROCEDURE spGetXML( pID IN NUMBER,  				                     pRefCur OUT TypeRefCur) 
  IS
      qryCtx DBMS_XMLGEN.ctxHandle;
      CLOB_XML CLOB;
 BEGIN
      qryCtx := dbms_xmlgen.newContext( SELECT STATEMENT);
      CLOB_XML := DBMS_XMLGEN.getXML(qryCtx);

      OPEN pRefCur FOR
               SELECT CLOB_XML FROM dual;
 END
If i insert the genrated XML clob into a table and then SELECT * FROM table as the pRefCur then this works but i don't want to create a new table just to deal with this.

Any suggestions or alternative solutions would be much appreciated.

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On