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: Number formats

Re: Number formats

From: P. Larsen <plarsen_at_ballston.uscg.mil>
Date: Thu, 4 Feb 1999 11:16:31 -0500
Message-ID: <79ci4f$7nh219@news.uscg.mil>


If you want char output, just use the to_char conversion:

   to_char(inum,'0009')

would show inum (an integer) as a four digit number, prefixed with zeros. An integer/number in the database is stored binary - hence you cannot store prefixed zeros.

Regards

Pilsbury wrote in message <01be4e05$426152b0$0159ea9e_at_mothergoose>...
>Hi people,
>
>Can anyone tell me how to pad a field which is declared as an integer (or
>number(38)) with zeros please? The field is always 4 digits but cannot be
>declared as CHAR as the Pro*C code I've got doesn't handle this. Each time
>I input 0005 for example, it is converted to 5 which is no good. Any
>suggestions would be greatly appreciated.
>
>TIA
>
>Pilsbury
Received on Thu Feb 04 1999 - 10:16:31 CST

Original text of this message

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