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 -> Re: Preserve leading 0 in NUMBER columns ?

Re: Preserve leading 0 in NUMBER columns ?

From: <mpir_at_compuserve.com>
Date: Tue, 22 Dec 1998 16:06:21 GMT
Message-ID: <75og1q$fpo$1@nnrp1.dejanews.com>


You can store it as a number, then use a format command on retrieval (to_char or col x format 09 or set numf 0999) or store it as a char/varchar. It depends on the metadata about the number as to which is better.

In article <367F948F.A24AAB77_at_nr.no>,
  Jan-Olav Eide <janolav_at_nr.no> wrote:
> I want to store, say, 03016536325 in a column,
> of type NUMBER (the leading 0 is significant).
> Can I do this or will I have to use VARCHAR2 ?
>
> --
> jo
>
>

--
Joseph R.P. Maloney, CCP,CSP,CDP
MPiR, Inc.
502-451-7404
some witty phrase goes here, I think.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Dec 22 1998 - 10:06:21 CST

Original text of this message

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