Skip to content
Advertisement

Oracle Procedure call too long string

Hello I have one procedure like

my problem is that P_SICIL or P_EXISTS can be too long so all length can be more then 4000 characters. when I call procedure it gives below error

ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 14103, maximum: 4000)

if I dont use to_char for clobs then I take error below

ORA-00932: inconsistent datatypes: expected – got CLOB ORA-06512: at “CARDREADER.PA_KART_READER”, line 285 ORA-06512: at line 2

if I dont use clob and use varchar2 as parameter type then I got error

ORA-01460: unimplemented or unreasonable conversion requested ORA-06512: at “CARDREADER.PA_KART_READER”, line 284 ORA-06512: at line 2

How can I solve this problem in oracle ?

Thanks in advance

Advertisement

Answer

The problem is that you are attempting to convert your CLOBs to VARCHAR2s when using the TO_CHAR function. REGEXP_SUBSTR can take CLOBs as the input parameter so try not casting the CLOBs, instead cast the result of the REGEXP_SUBSTR to be compared with SICIL_KOD.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement