I (uppercase) with dot above, cause ORA-06502: PL/SQL: numeric or value error: character string buff
We hit error "ORA-06502: PL/SQL: numeric or value error: character string buffer too small" when we do the following:
declare
i number;
v varchar2(30);
v1 varchar2(200);
begin
i:=0;
v1:='AAAAAAA AAİAİA AA AAAAAAAAA AAAAAAAAİ';
dbms_output.put_line(length(v1)||' '||v1);
v:=substr(v1, 1, 28)||' '||to_char(i);
dbms_output.put_line(length(v)||' '||v);
end;
however, if we change the v to varchar2(32), it will be success, but the final length of v is 30.
so what wrong when we declare only varchar2(30), but the system throw us the error, but in fact it is only 30 characters?