Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
rid_rj
Contributor III
Contributor III

java.sql.SQLException: ORA-12899: valeur trop grande pour la colonne "TALEND_REC6"."NOT_IMD"."DESCRIPTION" (réelle : 275, maximum : 255)

Hello,

I have a column with a size over 1000, i want to limit the number of characters to 255 so i used this instruction :

StringHandling.LEFT(row1.description,255)

but when i run the job, i got this problem :

tOracleOutput_15 ORA-12899: valeur trop grande pour la colonne "TALEND_REC6"."NOT_IMD"."DESCRIPTION" (réelle : 275, maximum : 255)

I can not understand the 20 characters between 275 and 255.

I try to delete all the characters no-ascii but i got the same result.

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Hi,

By default on Oracle side, varchar2 length is measured in bytes (in your case, 255) not in characters.

If there is some characters in the input flow which are encoding using 2 bytes, then the total length in bytes may exceed the max length for the Oracle column.

View solution in original post

3 Replies
TRF
Champion II
Champion II

Hi,

By default on Oracle side, varchar2 length is measured in bytes (in your case, 255) not in characters.

If there is some characters in the input flow which are encoding using 2 bytes, then the total length in bytes may exceed the max length for the Oracle column.

rid_rj
Contributor III
Contributor III
Author

hello TRF,

 

Thanks for your reply.

I added code java to delete the characters no ascii.

description.replaceAll("[^\\x00-\\x7F]", "");

 

Ridha

TRF
Champion II
Champion II

Great!

Remind this is not a good practice to accept your own solution when other people give you the direction to follow to solve your case.

 

Edit: thank's 0683p000009MA9p.png