numeric or value error: character string buffer too small


I got a problem with scared me a lot at my first sight, "numeric or value error : charactor string buffer too small".

because of "buffer", it seems a very hard issue, I can not find any questionable code , I turn to SP,

 

CREATE OR REPLACE PROCEDURE P_IC_USERS_S
(
......
cur_out OUT PKG_IC_CURSOR.REF_CURSOR
)

AS
v_count number :=0;
v_name varchar2(50);
BEGIN
SELECT COUNT(1) INTO v_count FROM .......;

IF v_count>0 THEN
select p.name into v_name from t_ic_profile p where...................;
END IF;

............................
END P_DM_IC_USERS_S;

 

the Chinese used to name ourselves within two or three words, so we are apt to think 50 is a big enough length for a variable for NAME fields , how ever , this time ,the guy's name longer than 50, so I got that scary exception....

 

 

solution: easy, give it a biger length is ok .


注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
粤ICP备14056181号  © 2014-2020 ITdaan.com