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