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: Keith Jamieson <pdkj02_at_email.mot.com>
Date: Tue, 02 Feb 1999 15:50:32 +0000
Message-ID: <36B71EC8.B9FD2024@email.mot.com>


You could try the following:

select substr('0000'||field_name,length('0000'||field_name)-3,4)
from table_name
where clause:

This will produce 4 digit numbers preceded by zeros.
Pilsbury wrote:

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 Tue Feb 02 1999 - 09:50:32 CST

Original text of this message

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