ORA-06502 on assignment to number with different precision
Hello,
I came around this PL/SQL code that throws ORA-06502 in the second assignment:
declare
aa number(4,2);
bb number(4,3);
begin
aa := 57;
bb := aa;
end;
When playing with different values of aa, sometimes the exception happens, sometimes not. I can avoid this error by changing aa into number(4,3) too, but there are many cases in our code where such assignment is done and it worries me. So I'd like to know some guidelines what kinds of numeric assignments are expected to always work and what are not.
declare
aa number(4,2);
bb number(4,3);
begin
aa := 57;
bb := aa;
end;
When playing with different values of aa, sometimes the exception happens, sometimes not. I can avoid this error by changing aa into number(4,3) too, but there are many cases in our code where such assignment is done and it worries me. So I'd like to know some guidelines what kinds of numeric assignments are expected to always work and what are not.
0