Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Function TO_CHAR
>>
>> 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
>
I forgot to mention why the space is NOT there when you don't use a format
model.
This too is true because it is documented that way. :D
From the SQL Reference:
"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"
regards,
Peter
Received on Thu Nov 04 2004 - 04:25:30 CST
![]() |
![]() |