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: Andreas Necker <Andreas.Necker_at_isb-ag.de.nospam>
Date: Thu, 04 Nov 2004 10:34:56 +0100
Message-ID: <0n9p52-pr4.ln1@isbka-px.intern.isb-ka.de>


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

Original text of this message

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