Oracle® OLAP Expression Syntax Reference Release 11.2 E23381-01 |
|
|
PDF · Mobi · ePub |
TO_BINARY_FLOAT
converts a text or numeric expression to a single-precision floating-point number.
BINARY_FLOAT
TO_BINARY_FLOAT (expr [, fmt [, 'nlsparam' ] ])
n
can be any text or numeric expression.
fmt
is a text expression that identifies a number format model as described in the Oracle Database SQL Language Reference.
nlsparam
specifies the characters used 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 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 interpret expr
.
All of these examples return the value 1.235E+003
:
TO_BINARY_FLOAT(1234.56) TO_BINARY_FLOAT('$1,234.56', '$9,999.99') TO_BINARY_FLOAT('1.234,56', '9G999D99', 'NLS_NUMERIC_CHARACTERS='',.''')