Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle equivalent of DB2 DIGITS function

519897Jun 23 2006 — edited Jun 23 2006
IBM 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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2006
Added on Jun 23 2006
7 comments
4,165 views