Unless you specify 'FM0000' in your format template, Oracle sticks a leading
blank onto it, try:
SELECT LENGTH(TO_CHAR(123,'FM0000')) "Bleah" FROM DUAL;
Dean Jefferson
Database Administrator
State of Wisconsin
Office of Commissioner of Insurance
[EMAIL PROTECTED]
> -----Original Message-----
> From: Jesse, Rich [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 19, 2001 2:41 PM
> To: Multiple recipients of list ORACLE-L
> Subject: TO_CHAR conversions require an extra byte?
>
>
> Can anyone explain the following or point me to an FM to R?
>
> SELECT LENGTH(TO_CHAR(123,'0000')) "Bleah" FROM DUAL;
>
> Bleah
> ------
> 5
>
> For some silly reason, I would have expected the length to be "4". An
> implicit sign perhaps?
>
> TIA,
> Rich Jesse System/Database Administrator
> [EMAIL PROTECTED] Quad/Tech International,
> Sussex, WI USA
>
>
> --------------------------------------------------------------
> ---------
>
> This message has been scanned for viruses with Trend Micro's
> Interscan VirusWall.
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Jesse, Rich
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Jefferson, Dean
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).