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

Number to Char conversion

From: mme <mattias.meyer_at_t-online.de>
Date: 7 Feb 1999 18:05:24 +0100
Message-ID: <79kh4k$aaf$1@news07.btx.dtag.de>


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 - 11:05:24 CST

Original text of this message

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