Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to store 3 zeros in a numeric field?
Message
De
22/11/2002 14:54:29
Larry Rix
Larry Rix & Associates, Inc.
Westminster, Colorado, États-Unis
 
 
À
21/11/2002 20:22:05
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00725567
Message ID:
00725982
Vues:
14
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
Fil
Voir

Click here to load this message in the networking platform