<sh******@cs.fs u.edu> wrote
I see other posts where some say fields
that will hold a number with leading zeros
should be stored as text instead of numbers.
This is very inefficient though, as a string
of digit characters takes up much more
memory than a 32bit or even a 64bit int.
Storing as a number still allows for formatting
when displaying the number, correct?
I am creating a table and would like
opinions regarding this please.
One general rule that seems to work well is to store in numeric field format
if the number is to be used in calculations; store in text if the "number"
is for identification. After a few years in the application development
business, I am no longer surprised when a "Product ID Number" turns out to
have alphabetic characters, or when the client later decides to use
alphabetic characters in a previously all-numeric identification.
Lyle is correct... "leading zeros" are only a particular format for
displaying numbers. 000012 is the same number as 0012 or 12. Rick is
correct... if 000012 is different from 0012 or 12, you are not talking about
numbers, but about numeric characters which you will have to store in text.