Skip to Main Content

Oracle Database Discussions

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!

Reterive the data more than 32k using dbms_lob.substr in clob column

N_RajMar 27 2018 — edited Mar 27 2018

Hi All,

We have oracle 11.2 on Aix.

we have varchar2(4000) datatype in the table.Recently changed fromĀ  varchar2(4000) to clob due to application upgrade.

While retrieve the data from the table using this column,we got an error "ORA-00932: inconsistent datatypes: expected - got CLOB"

Hence,we changed in select query like this dbms_lob.substr(clob_columnanme,32767). it works.

We followed this link "https://docs.oracle.com/cd/E18283_01/appdev.112/e16760/d_lob.htm".

The link says that the below.

"This function returns amount bytes or characters of a LOB, starting from an absolute offset from the beginning of the LOB.

For fixed-width n-byte CLOBs, if the input amount for SUBSTR is greater than (32767/n), then SUBSTR returns a character buffer of length (32767/n), or the length of the CLOB, whichever is lesser. For CLOBs in a varying-width character set, n is the maximum byte-width used for characters in the CLOB."

If i want to reterive the data more than 32767 characters ,what should we do?

What is offset in dbms_lob.substr.

Is there any other method to retrieve clob data?

Any Suggestions.

Thanks & Regards,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2018
Added on Mar 27 2018
3 comments
1,651 views