Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Should I use currency or num(14,2) ?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00273031
Message ID:
00273056
Views:
22
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform