TO_NUMBER Syntax - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

Syntax

[TD_SYSFNLIB.] TO_NUMBER (
  string_expr [, format_arg [, NLS_param ] ]
)

Syntax Elements

TD_SYSFNLIB.
Name of the database where the function is located.
string_expr

A character expression. string_expr contains a number in the format specified by format_arg. If the conversion fails, NULL is returned.

format_arg

A character expression.

If this syntax element is not valid, an error is returned.

If this syntax element is NULL, NULL is returned.

For more information, see TO_NUMBER format_arg Format Elements.
NLS_param

A character expression.

NLS_param specifies characters that are returned by number format elements:
  • Decimal character
  • Group separator
  • Local currency symbol
  • Dual currency symbol
  • International currency symbol
Valid values for param are:
  • NUMERIC_CHARACTERS = ' 'dg' '
  • CURRENCY = ' ' text ' '
  • DUAL_CURRENCY = ' ' text ' '
  • ISO_CURRENCY= ' ' text ' '

The characters d and g represent the decimal character and group separator respectively. They must be different single-byte characters. Text must be enclosed in apostrophes. Ten characters are available for the currency symbol.

If NLS_param is NULL, NULL is returned.