Converts the string -$12,345.67 to a number, passing the format string $99,999.99 to TO_NUMBER() : TO_NUMBER « Conversion Functions « Oracle PL/SQL Tutorial






SQL>
SQL> SELECT TO_NUMBER('-$12,345.67', '$99,999.99') FROM dual;

TO_NUMBER('-$12,345.67','$99,999.99')
-------------------------------------
                            -12345.67

SQL>
SQL>








15.8.TO_NUMBER
15.8.1.TO_NUMBER(x [, format]) converts x to a number.
15.8.2.Convert the string 97.13 to a number using TO_NUMBER() and then adds 25.5 to that number
15.8.3.Converts the string -$12,345.67 to a number, passing the format string $99,999.99 to TO_NUMBER()
15.8.4.to_number('123')