Oracle equivalent of DB2 DIGITS function
519897Jun 23 2006 — edited Jun 23 2006IBM DB2 has a DIGITS SQL function that returns a character-string representation of a number, with the following properties:
The result of the function is a fixed-length character string representing the absolute value of the argument without regard to its scale. The result does not include a sign or a decimal character. Instead, it consists exclusively of digits, including, if necessary, leading zeros to fill out the string.
For example, for a NUMBER(6,2) column with value -6.28, the string '000628' is returned.
Is there an equivalent SQL function available in Oracle 10g? Or if there's no equivalent, how can this be done in Oracle 10g?