Monday, August 31, 2009

ORA-06502: PL/SQL: numeric or value error: character string buffer too small

This is a common error faced by many of us and some times it takes hours to find what went wrong.

The reason it happens is

1) The size of the Varchar2 parameter, the maximum allowed size of the Varchar2 datatype is 4000, if the input string exceeds that number you will get this error.

2) Or you have defind your parameter of size 10 and trying to write 12 characters.

Workaround - For first reason, there is no way out you can use the Varchar2 datatype, better use CLOB objects.

For second, try to increase the size of the parameter.

Hope this helps.

Thanks
-Azhar

No comments:

Post a Comment