Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

ORA-12899: value too large for column

SA-18299

Summary



User has a section, in which they have used a Text Area with restriction of max characters to 255.
In database, they have column for this text area input of length 255 bytes (VARCHAR2(255)).

In front-end, in the text area, if the input is given special characters with maximum length of 255 characters and submit the section or form, then the user is getting the below error:
" ORA-12899: value too large for column "PEGADATA"."PC_XXXXXX"."PROBLEMDESCRIPTION" (actual: 525, maximum: 255)"
and the case is not getting created.

 

Error Messages



" ORA-12899: value too large for column "PEGADATA"."PC_XXXXXX"."PROBLEMDESCRIPTION" (actual: 525, maximum: 255)"


Steps to Reproduce



1. Include a Text area (with max 255 characters allowed) in a section or form with the respective exposed database column of length VARCHAR2(255 Bytes)
2. Enter 255 special characters (£ or $ or %) in the text area and submit the form. One can observe mentioned Error ORA-12899 and following this error case does not get created.


Root Cause



 By default the columns created as VARCHAR will use byte semantics, so column length of 64 meant 64 bytes.

Some foreign language characters can use multiple bytes (here ê) in UTF-8 which is a multi-byte characterset.

This is why, when there is a foreign character, PRPC treated it as one character, but it occupied more than 1 byte.
And if length was greater than column length, then even on truncating by PRPC, it would still over-shoot the column limit.

​Refer to the following doc:

http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i1835

Resolution



Alter the column to give character length instead of number of bytes.

​Example: alter table tablename modify ( varchar2 (32 CHAR));

Published January 30, 2016 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us