Mega Code Archive

 
Categories / Oracle PLSQL / Data Type
 

Convert the string to a number and pass the format string $99,999 99 to TO_NUMBER()

SQL> SQL> -- Convert the string to a number and pass the format string $99,999.99 to TO_NUMBER(): 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> SQL>