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.

Unanswered: displaying value of a CLOB

I now want to execute the function to see if it is working the way I expect it to.

To do this, I have logged into SQL*Plus, and entered the following commands:

variable foo clob;
exec :foo := my_function();
print foo;

The problem is, is that this only outputs the first [small] part of the CLOB. Is there a way that I can examine the contents of a CLOB from SQL*Plus?

I have also tried adding code to the inside of the function at the very end like this (where theClobRetVal is a CLOB variable has been populated with data and is about to be returned from the function:

Re: displaying value of a CLOB

ok - the first problem of the dbms_output.put_line() statements not outputting was a) because I'd accidentally put them in a commented out section, and b) the syntax of the DBMS_LOB.READ( theClobRetVal,80,1,theVarChar); statements is incorrect....

I am still not able to see the contents of the clob though...

any suggestions very welcome. 8-)

thanks

David.

Originally posted by dbuddrige
Hi all,

I have written a PL/SQL function that returns a CLOB.

I now want to execute the function to see if it is working the way I expect it to.

To do this, I have logged into SQL*Plus, and entered the following commands:

variable foo clob;
exec :foo := my_function();
print foo;

The problem is, is that this only outputs the first [small] part of the CLOB. Is there a way that I can examine the contents of a CLOB from SQL*Plus?

I have also tried adding code to the inside of the function at the very end like this (where theClobRetVal is a CLOB variable has been populated with data and is about to be returned from the function: