jasonwood Posted January 1, 2003 Posted January 1, 2003 This seems like a dumb question, but I thought I'd ask just in case there are some smart answers! If you're not going to be performing any mathematical computations on a field, but you expect it only to contain numbers (eg: Invoice Number)... are there any advantages to using a number or text field?
LiveOak Posted January 1, 2003 Posted January 1, 2003 If you wanted to sort invoices by Invoice Number and a text field was used, the sort wouldn't be in numerical order. Also, number formatting would not be available. -bd
kennedy Posted January 2, 2003 Posted January 2, 2003 Yep, use a Number if you want number formatting, number sorting, or to more easily use the field as a Number in number calcualations. The disadvantage is that a Number as a calculation is IEEE floating point... so precision may be lost if you need to hold numbers with lots of digits. And as a result you can get some weirdnesses of what's displayed vs. what is really in the field. If you are using the number as a key or ID field, I recommend using Text with storage type ASCII.
jasonwood Posted January 2, 2003 Author Posted January 2, 2003 If you are using the number as a key or ID field, I recommend using Text with storage type ASCII. Yep, in particular I was thinking about record serial numbers (like invoice numbers, product numbers, etc.)
RussBaker Posted January 2, 2003 Posted January 2, 2003 I try to use numbers as a last resort. I find that text fields are much better for invoices, product numbers etc because you can easily deal with and invoice or part number like AB0025-0347, which would give a number field convulsions, and which (hopefully) provides a bit more information to a user than a straight number. Adding leading zeros to the components of your "number" will get around sorting problems.
Recommended Posts
This topic is 8066 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now