Oracle® OLAP Expression Syntax Reference Release 11.2 E23381-01 |
|
|
PDF · Mobi · ePub |
TO_NCHAR(number)
converts a number to the national character set.
NVARCHAR2
TO_CHAR(n [, fmt [, 'nlsparam' ] ])
n
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 Language Reference.
nlsparam
is a text expression that specifies the characters that are returned by these number format elements:
Decimal character
Group separator
Local currency symbol
International currency symbol
This argument has the format shown here:
'NLS_NUMERIC_CHARACTERS = ''dg'' NLS_CURRENCY = ''text'' NLS_ISO_CURRENCY = territory '
The characters d
and g
represent the decimal character and group separator, respectively. 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_NCHAR(1234567, 'C9G999G999D99')
returns a text string such as USD1,234,567.00
.
TO_NCHAR(1234567, 'C9G999G999D99', 'NLS_ISO_CURRENCY = SPAIN')
returns the text string EUR1,234,567.00
.