Home » SQL & PL/SQL » SQL & PL/SQL » problem of inserting a long string of characters :ORA-22835: Taille de tampon insuffisante pour la c (11g)
problem of inserting a long string of characters :ORA-22835: Taille de tampon insuffisante pour la c [message #670207] Mon, 18 June 2018 08:22 Go to next message
achraf87
Messages: 6
Registered: May 2012
Location: France
Junior Member
Hello Team ,


I'm trying to insert into a table " TEST COM " the result of selecting rows of another table.
I used the wm_concat function .


/**********/

insert into COMMENTAIRE_TEST (SELECT wm_concat((DBMS_LOB.SUBSTR(COM_TEXTE,4000,1))) as test
FROM commentaire
--where COM_NUMREF=1416
GROUP BY COM_NUMREF)

/************/

when I execute the query, I have the following error

/*****************************************************************************
Rapport d'erreur -
Erreur SQL : ORA-22835: Taille de tampon insuffisante pour la conversion de CLOB en CHAR ou de BLOB en RAW (réelle : 46972, maximum : 4000)
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.
/*********************************************************************************

I need your help please Smile

thank you in advance
Re: problem of inserting a long string of characters :ORA-22835: Taille de tampon insuffisante pour la c [message #670208 is a reply to message #670207] Mon, 18 June 2018 08:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Welcome to this forum

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read

post CREATE TABLE statements for both tables
Re: problem of inserting a long string of characters :ORA-22835: Taille de tampon insuffisante pour la c [message #670209 is a reply to message #670208] Mon, 18 June 2018 08:53 Go to previous message
cookiemonster
Messages: 13919
Registered: September 2008
Location: Rainy Manchester
Senior Member
You should be using the documented aggregation function - listagg - not wm_concat.
That's not necessarily going to fix this problem but you should be doing that regardless.
Previous Topic: Use multi-threading in PL/SQL
Next Topic: divide text string into different columns
Goto Forum:
  


Current Time: Tue Apr 16 07:43:32 CDT 2024