The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.
Thanks for the question, pushpendra.
Asked: April 10, 2019 - 7:23 am UTC
Last updated: April 17, 2019 - 9:22 am UTC
Version: 11g
Viewed 10K+ times! This question is
SELECT XMLTYPE (UTL_RAW.cast_to_varchar2 (TXT_RESPONSE_XML)).EXTRACT('<b:House>').Getstringval() XMLSrc FROM a2009513_mma x WHERE x.num_quote= '0106800970294';
ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 6843, maximum: 2000) 22835. 00000 - "Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: %s, maximum: %s)" *Cause: An attempt was made to convert CLOB to CHAR or BLOB to RAW, where the LOB size was bigger than the buffer limit for CHAR and RAW types. Note that widths are reported in characters if character length semantics are in effect for the column, otherwise widths are reported in bytes. *Action: Do one of the following 1. Make the LOB smaller before performing the conversion, for example, by using SUBSTR on CLOB 2. Use DBMS_LOB.SUBSTR to convert CLOB to CHAR or BLOB to RAW.
create table t ( c1 blob ); insert into t values ( utl_raw.cast_to_raw('<rt><a>this</a><b>that</b></rt>') ); commit; select xmltype.createXML ( c1, 1, null ), xmltype.createXML ( c1, 1, null ).extract ( '/rt/a' ) from t; XMLTYPE.CREATEXML(C1,1,NULL) XMLTYPE.CREATEXML(C1,1,NULL).EXTRACT('/RT/A') <rt> <a>this</a> <a>this</a> <b>that</b> </rt>
New to good database design? Check out Chris Saxon's full fundamentals class.