Re: Column space requirements - VARCHAR2 versus NUMBER

From: Walt <walt_askier_at_yahoo.com>
Date: Mon, 09 May 2011 16:01:16 -0400
Message-ID: <hKXxp.137079$qV.109009_at_en-nntp-09.dc1.easynews.com>



On 5/8/2011 11:08 PM, Rockhound57 wrote:

>
> Leading zeros... Think everyone haves them.
Rockhound,

Did you meant to say "everyone *hates* them"? If so, I'm in complete agreement.

Luke,

Unless you are working with legacy data where (for instance) you need to distinguish between 42 042 and 000042, everything will work much much better if you just use the Number datatype. Numeric-like data with leading zeroes is a notorious bug-inducer - in particular, M$ Excel has fits whenever it encounters numeric-like data with leading zeroes.

If you can design them out of the spec now, you will save yourself and your colleagues many many frustrating hours of coding around the leading zeroes.

There are space and speed advantages of going with the Number datatype as well, but they pale in comparison to the frustration you'll encounter when the system *breaks* rather than just being slow or taking up a lot of space.

//Walt Received on Mon May 09 2011 - 15:01:16 CDT

Original text of this message