Errors with the Format Mask
SQL>
SQL> DECLARE
2 v_Convert_Number VARCHAR2(20) := '$119,252.75';
3 v_Hold_Number NUMBER ;
4 BEGIN
5 v_Hold_Number := TO_Number(v_Convert_Number,'$99,999.99');
6 DBMS_OUTPUT.PUT_LINE('The converted number is: ' || v_Hold_Number);
7 DBMS_OUTPUT.PUT_LINE('Your commission at 6% is: ' ||
8 (v_Hold_Number*.06));
9 END;
10 /
DECLARE
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 5
SQL>
SQL>
SQL> --
Related examples in the same category