Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: TO_CHAR conversions require an extra byte?
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
Dean.Jefferson_at_oci.state.wi.us
> -----Original Message-----
> From: Jesse, Rich [mailto:Rich.Jesse_at_qtiworld.com]
> 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
> Rich.Jesse_at_qtiworld.com 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: Rich.Jesse_at_qtiworld.com
>
> 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: ListGuru_at_fatcity.com (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: Dean.Jefferson_at_oci.state.wi.us 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: ListGuru_at_fatcity.com (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).Received on Mon Mar 19 2001 - 16:04:15 CST
![]() |
![]() |