DIGITS

Restriction: This topic applies to Windows environments only.
ANSI DB2 SQL/DS XDB
  X   X

Returns a string representation of a number, without decimal points. The x parameter must be an integer or decimal number. The format appears below:

DIGITS(x)

In DB2 compatibility mode, the result is unsigned and padded with leading zeroes so that the string length is 5 if the argument is a small integer, 10 if the argument is an integer, or p if the argument is a decimal number with precision p. In XDB mode the result is a variable length string and may include a sign. An example of the use of DIGITS is:

SELECT DIGITS(o_no)
FROM orders