🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.oracle.tools
Article #4

Re: to_char(123, '999999') problem

#4
From: Mike Morgan
Date: Tue, 02 May 2000 00:00
22 lines
1509 bytes
When a number is converted to text, a leading space is left in case the
number is negative (eg:  to_char(-123,'99999')).  If you don't want a
leading space, you'll have to ltrim(to_char(123, '999999')).

Mike
================================

Marcos Leija <marcos.leija@cas-mddc.com> wrote in message
news:390E051A.6CF86E98@cas-mddc.com...
> How do I get rid of the leading space that to_char() creates when I set
> it up like this:
> to_char(123, '999999')
> returns ' 123'
>
>
> In actuality, I need to_char() to do this:
> to_char(123, '099999')
> ...but it does the same thing.
>
> Is this a bug or is this some setting I left out?
> Marcos
>
Technical Details
Message-ID: <rKpP4.46$do2.99058@ratbert.tds.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <390E051A.6CF86E98@cas-mddc.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5464,9d34cd84934db462
X-Google-Attributes: gidf5464,public
X-Google-Thread: 11355a,9d34cd84934db462
X-Google-Attributes: gid11355a,public
From: "Mike Morgan" <mmorgan1@mail.tds.net>
Subject: Re: to_char(123, '999999') problem
Date: 2000/05/02
Message-ID: <rKpP4.46$do2.99058@ratbert.tds.net>
X-Deja-AN: 618074424
References: <390E051A.6CF86E98@cas-mddc.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
X-Complaints-To: abuse@tds.net (TDS.NET help Desk 1-888-815-5992)
X-Trace: ratbert.tds.net 957229079 207.0.83.190 (Mon, 01 May 2000 19:57:59 CDT)
Organization: TDS.NET Internet Services www.tds.net
X-MSMail-Priority: Normal
NNTP-Posting-Date: Mon, 01 May 2000 19:57:59 CDT
Newsgroups: comp.databases.oracle.tools,bit.listserv.sqlinfo