Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Fetch VARCHAR2 from CLOB

A-KJul 4 2009 — edited Jul 5 2009
Hi,

I have a plsql function which returns CLOB.(xml format)
How do i convert the output CLOB to VARCHAR2 and select the function from a SELECT query.
The returned output CLOB has more than 4000 characters.

Using DBMS_LOB.SUBSTR only first 4000 characters are extracted , if we go for a larger value it gives a error.

SELECT DBMS_LOB.SUBSTR((Getswiftmsgtagsappended_New(10,2,4,'SWIFT','103')),4000,1) FROM dual

How to resolve this.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2009
Added on Jul 4 2009
6 comments
822 views