Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Number to Char conversion
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