I define a procedure do parse a formula (type value String) to a value number: Some case value in formula can execute or raise error numeric overflow. Code :
DECLARE
formula VARCHAR2(1000) := '1111111111 * 2';
val NUMBER;
BEGIN
EXECUTE IMMEDIATE 'BEGIN :res := '||formula||'; END;' USING OUT val;
DBMS_OUTPUT.PUT_LINE ( 'formula = ' || formula );
DBMS_OUTPUT.PUT_LINE ( 'val = ' || val );
END;
In this case then raise error numeric overflow. When i increase value operands more/less than 10 character 1 then it working right.
I try to check a few values and see most of the error if the value in the formula contains the number 1. Is this the reason?
Thank guys!