Information générale
Catégorie:
Codage, syntaxe et commandes
Henry --
The answer to your question could be as simple as formatting within a text box so that the value is padded left or right with zero's.
Still -- The real issue may not be storage, but presentation. Your end users may not really care how things are stored. What they may care about is how the value is displayed or presented (i.e. interactively in a window, printed in a report, used in calculations, etc). Thus, it is ok to store a numeric value in the most efficient manner and then convert it for presentation purposes as needed.
Storing the numeric data as character might be a solution, but is not the only one. You must decided based on the needs of your system. Ask yourself the following questions to begin with and see where they take you:
1. What are the efficiency issues with how value is stored?
to that end ...
2. Will the value be used in a calculation, or will it only ever be presented as it is stored?
3. What is the overhead throughout the system if the value is stored as character and then converted to numeric when needed in a calculation?
4. What is the overhead throughout the system if the value is stored as a numeric value and converted to a presentation format as needed?
Hope some of this helps you out.
Sincerely,
Larry Rix
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement