Oracle9i SQL Reference Release 2 (9.2) Part Number A96540-02 |
|
|
View PDF |
to_number::=
TO_NUMBER
converts char
, a value of CHAR
, VARCHAR2
, NCHAR
, or NVARCHAR2
datatype containing a number in the format specified by the optional format model fmt
, to a value of NUMBER
datatype.
Note: This function does not support |
The following example converts character string data into a number:
UPDATE employees SET salary = salary + TO_NUMBER('100.00', '9G999D99') WHERE last_name = 'Perkins';
The 'nlsparam'
string in this function has the same purpose as it does in the TO_CHAR
function for number conversions.
SELECT TO_NUMBER('-AusDollars100','L9G999D99', ' NLS_NUMERIC_CHARACTERS = '',.'' NLS_CURRENCY = ''AusDollars'' ') "Amount" FROM DUAL; Amount ---------- -100