TO_NUMBER converts a text expression containing a number to a value of NUMBER data type.
NUMBER
TO_NUMBER(expr [, fmt [, 'nlsparam' ] ])
expr is a numeric expression to be converted.
fmt is a text expression that identifies a number format model as described in the Oracle Database SQL Reference.
nlsparam specifies the characters that are returned by these number format elements:
This argument has the format shown here:
'NLS_NUMERIC_CHARACTERS = ''dg'' NLS_CURRENCY = ''text'' NLS_ISO_CURRENCY = territory '
The d is the decimal character, and the g is the group separator. They must be different single-byte characters. Within the quoted string, use two single quotation marks around the parameter values. Ten characters are available for the currency symbol.
If you omit this argument or any of the NLS parameters, then this function uses the default values for your session.
TO_NUMBER( '100.00', '9G999D99') returns the value 100.00.
Copyright © 2003, 2007, Oracle. All rights reserved.