TO_NUMBER converts argument 1 toa NUMBER value.

Syntax:

TO_NUMBER(arg1,format,params)

The arg1 argument can be a BINARY_FLOAT, BINARY_DOUBLE,CHAR,VARCHAR2,NCHAR, or NVARCHAR2 data type.

The format parameter can be any valid date format.

Valid options for the ‘params’ argument:

NLS_NUMERIC_CHARACTERS = To specify the decimal and group characters.

NLS_CURRENCY = To specify the local currency symbol

NLS_ISO_CURRENCY = To specify the international currency symbol.

Example:

SELECT TO_NUMBER(’15’) as RESULT FROM DUAL;

RESULT
————
15

To_number – Oracle SQL Function
Tagged on: