Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Currency vs Numeric
Message
De
29/08/2005 08:40:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
29/08/2005 04:49:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01044699
Message ID:
01044737
Vues:
13
>Hi all
>
>I understand that using Currency field may need to calculation inaccuracy without using MTON() function to first convert it into numeric. I would appreciate if you could advise what then are the benefits of using Currency field instead of Numeric field when designing database.
>
>Thanks & Best Regards

Currency can save space for storing some data.

With currency, you will have exact results for addition and subtraction.

For calculations that include multiplications and divisions, it is sometimes problematic; almost any calculation that includes currency will be converted to currency, so you can lose accuracy (since only 4 digits are used). In many cases, you have to use mton() to convert to numeric first.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform