Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Number field as '0003' not '3'
Lots of questions.
1. Why?
2. Is this for output from the database? If so then use the
to_char(xxx,'0999') to format the number.
3. Is this number used in calculations? If not define it as a CHAR (or
VARCHAR2) length of 4 and validate the number as 4 long on input.
With out knowing the needs and purpose of your application, it is difficult to answer the question.
HTH
James
In article <dolans.906656570_at_stripe.Colorado.EDU>, dolans_at_stripe.Colorado.EDU (Sean Dolan) wrote:
> I found out as I was going through my data in my dbase that all my
number fields that did not start with a solid number (1 thru 9), came out
"short". If I want a number field to be 4 digits long, how do I get that
regardless of whether the user puts in "3" ( I would like "0003")
>
>Thanks,
>Sean
--
lorenzen_at_tiny.net | Life is complex; it has | real and imaginary partsReceived on Thu Sep 24 1998 - 18:25:43 CDT
![]() |
![]() |