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: Number to Char conversion

Re: Number to Char conversion

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 07 Feb 1999 23:05:50 +0100
Message-ID: <36BE0E3E.53A0BBE@sybrandb.demon.nl>


This is a 'feature' of which I don't better has always been there. It actually reserves space for a sign byte.

Hth,
Sybrand Bakker, Oracle DBA

mme wrote:

> Hello all of you!
>
> When I do the following in PL/SQL:
>
> <string> := TO_CHAR(<number>, '00');
>
> The <string> is declared as a CHAR(2) and <number> as a NUMBER(2,0).
> <number> always contains 1 - 99.
>
> Why do I always get a errormessage saying the the conversion canīt be done?
> When I declare the <string> as a CHAR(3) it works... but I get a
> space/blank
> as first position of the string. How come?
>
> I then use
> LTRIM(<string>, ' ');
> but I wanna know why it works the way it does????
>
> Regards
>
> /\/\attias


Received on Sun Feb 07 1999 - 16:05:50 CST

Original text of this message

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