DIGITS: Converting a Numeric Value to a Character String

How to:

The DIGITS function extracts the digits of a decimal or integer value into a character string. The sign and decimal point of the number (if present) are ignored.

Note: This function is available for DB2, ORACLE, and MS SQL Server. It does not work for flat file sources.


Top of page

x
Syntax: How to Convert a Numeric Value to a Character String
DIGITS(arg)

where:

arg

Numeric (decimal or integer, not floating-point)

Is the numeric value.

The length of the resulting string is determined by the precision of the argument.



Example: Converting a Numeric Value to a Character String

DIGITS converts a numeric value to a character string. This example,

DIGITS(-444.321)

returns 0000444321.


iWay Software