Prev: Hidden Field in Datasheet view for a table
Next: Set up db to lookup and concatenate large amounts of text
From: Steve on 15 Dec 2009 20:20 Greetings: I have numeric data with which I do not need to perform calculations nor do I need to sort it. Is it better to store this type of data as a number or text in terms of the efficiency of the database? Thanks for any thoughts on this. -- Steve
From: Ken Snell on 15 Dec 2009 22:31 Number datatype usually occupies less memory space than text, depending on the number of digits in the number (as the number of digits increases, text uses more memory while number uses same amount regardless of digit count). So go with number. -- Ken Snell http://www.accessmvp.com/KDSnell/ "Steve" <Steve(a)discussions.microsoft.com> wrote in message news:18C8F658-8083-4A6C-8868-E3EB702260AD(a)microsoft.com... > Greetings: > > I have numeric data with which I do not need to perform calculations nor > do > I need to sort it. Is it better to store this type of data as a number or > text in terms of the efficiency of the database? Thanks for any thoughts > on > this. > -- > Steve
From: Jerry Whittle on 16 Dec 2009 11:11 I disagree with Ken. Some 'numbers', such as Social Security Numbers, Zipcodes, and even some phone numbers, can start with zeros. If you store these in a number field, the leading zeros are removed. Then you need to use code or fancy formatting to reinsert the zeros before use in something like a mail merge. There goes any efficiency of storing it as a number. I say that if your aren't doing math on it, it isn't a number. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Steve" wrote: > Greetings: > > I have numeric data with which I do not need to perform calculations nor do > I need to sort it. Is it better to store this type of data as a number or > text in terms of the efficiency of the database? Thanks for any thoughts on > this. > -- > Steve
From: Keith Wilby on 16 Dec 2009 11:35 "Jerry Whittle" <JerryWhittle(a)discussions.microsoft.com> wrote in message news:F10879D8-01B9-4639-84AD-D18F5409603A(a)microsoft.com... > > I say that if your aren't doing math on it, it isn't a number. > FWIW I agree and I must say that I thought it was "best practice" too. Keith. www.keithwilby.co.uk
From: Jeff Boyce on 16 Dec 2009 11:48 Steve Just because you call it a "number" doesn't make it a true number. As others have pointed out, if you don't need to "do math" on it, it isn't really a number. If it isn't really a number, don't 'type' it as a numeric data type. Access expects different things when using numbers, and handles numbers differently (see comment in-thread about leading zeros...). And if you are concerned about "the efficiency" of the database, I don't believe you'd notice the difference in either performance or storage, using Text vs. Numeric data types ... unless your database had millions of rows! Good luck! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Steve" <Steve(a)discussions.microsoft.com> wrote in message news:18C8F658-8083-4A6C-8868-E3EB702260AD(a)microsoft.com... > Greetings: > > I have numeric data with which I do not need to perform calculations nor > do > I need to sort it. Is it better to store this type of data as a number or > text in terms of the efficiency of the database? Thanks for any thoughts > on > this. > -- > Steve
|
Next
|
Last
Pages: 1 2 Prev: Hidden Field in Datasheet view for a table Next: Set up db to lookup and concatenate large amounts of text |