Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Function TO_CHAR

Re: Function TO_CHAR

From: Jared Still <jkstill_at_gmail.com>
Date: 4 Nov 2004 09:35:31 -0800
Message-ID: <bf4638.0411040935.483a5a79@posting.google.com>


"Petr Benes" <benes_at_epos.cd.cz> wrote in message news:<4189e1f4.0_at_10.140.56.22>...
> 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?
>

Because it is a positive number.

Try :

select

   TO_CHAR(15,'FM0999'),
   dump(TO_CHAR(15,'FM0999'))
from dual

Next, RTFM on to_char (number) and then read the format model for numbers table.

Jared Received on Thu Nov 04 2004 - 11:35:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US