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

Home -> Community -> Usenet -> c.d.o.misc -> Re: CHAR TO NUMBER - NUMBER TO CHAR

Re: CHAR TO NUMBER - NUMBER TO CHAR

From: Greg <greg_at_ostnet.com>
Date: Thu, 4 Oct 2001 17:54:40 -0400
Message-ID: <3bbcd8fa$1@news1>


Here's a sample of padding a number with zeros...

select to_char(5,'0000') from dual;

Greg Vitetzakis V Greg Vitetzakis V.P. Professional Services OSTnet (Open Source Technologies Inc.)
www.ostnet.com
"Félix" <fgaitero_at_e-netfinger.com> wrote in message news:9p1el6$nsi$1_at_talia.mad.ttd.net...
> I have to converse a datatype from CHAR(4): '0004', to NUMBER: 4. Then I
> add 1 to this number: 4 + 1 = 5. I converse it to CHAR again but, when I
> select this value from the table I just get 5 and not 0005 as I want. It's
> still a CHAR(4) but it appears only with one character and not four as it
> should.
> How could I do to obtain '0005' and not '5' ?
> Thanks.
> Félix
>
>
Received on Thu Oct 04 2001 - 16:54:40 CDT

Original text of this message

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