Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Function TO_CHAR
"Petr Benes" <benes_at_epos.cd.cz> schreef in bericht
news:4189e1f4.0_at_10.140.56.22...
> 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?
>
> Thanks
>
>
Because it is documented that way. :-)
From SQL-Reference:
"Element Example Description"
"9 9999 Returns value with the specified number of digits
with a leading space if positive or with a leading minus if negative."
The leading space is not specifically being caused by the "0", but by the "9" format in general.
Peter Received on Thu Nov 04 2004 - 04:19:59 CST
![]() |
![]() |