aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

PLS-01905: : character string buffer too small

PLS-01905: : character string buffer too small
Cause: An error was encountered while moving a character string from a source to a destination. This error occurs if, for example, an attempt is made to move a a character string of 10 characters into a 1 character buffer. The cause of this error may not always be obvious. For example, the following will result in this error: a varchar2(1); b number; b := 10; a := b; An error results because an implicit conversion causes the number 10 to become the character string '10', which does not fit in the character buffer of 1 allocated for the variable a.
Action: First, look for character string assignment statements where the buffer size is mismatched. If there are none found, then consider the implicit conversion case illustrated in the example above.

请先 登录 后评论

1 个回答

小智
PLS-01905:字符串缓冲区太小,
.原因:将字符串从源移动到目的地时遇到错误。如果尝试将10个字符的字符串移动到1个字符缓冲区中,则会发生此错误。这个错误的原因可能并不总是很明显。例如,以下将导致此错误:varchar2(1); b号; b:= 10; a:= b; 由于隐式转换导致数字10变为字符串'10',因此不适用于为变量a分配的1的字符缓冲区,所以导致错误。,
.操作:首先,查找缓冲区大小不匹配的字符串赋值语句。如果没有找到,则考虑上面示例中所示的隐式转换情况。,
.
请先 登录 后评论