Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Function TO_CHAR
Hi,
Petr Benes wrote:
> Hi
>
> Expression TO_CHAR(15) returns '15'. It is correct.
> Expression TO_CHAR(15,'0999') returns ' 0015' instead '0015'.
> Tested in version 10q as well as 7.3.4.
>
> Do you know why there is the blankspace?
>
RTFM ...
TO_CHAR converts n of NUMBER datatype to a value of VARCHAR2 datatype,
using the optional number format fmt. If you omit fmt, n is converted to
a VARCHAR2 value exactly long enough to hold its significant digits.
Negative return values automatically contain a leading negative sign and positive values automatically contain a leading space unless the format model contains the MI, S, or PR format element.
Ciao
Andreas
Received on Thu Nov 04 2004 - 03:34:56 CST
![]() |
![]() |