Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Should I use currency or num(14,2) ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00273031
Message ID:
00273056
Vues:
21
>Does it make more sense to use the currency type or the numeric (14,2) ? It is for North America. Does it mater ?
>
>Thanks
>Eric.

Eric,
While either one will work, the currency format is more efficient to use in calculations. A numeric field is stored as a string in the table and must be converted from string to numeric to perform a calculation. If you save a numeric result it must be converted back to a string to store it in the table.

A currency field is stored in a binary format that allows calculations to be performed without the conversion step. One downside that I have found is the need to use the NTOM function to convert numeric variables when using SQL inserts or updates.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform