|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Displaying Small MoneyHi,
How do I remove the decimal places from this to show just whole pounds ? SELECT '£' + convert(varchar(30),PotentialRevenue,3) as [Potential Revenue] What is the purpose of the small money data type ? - its seems to have no features for storing/displaying financial data that cant be done with other data types. > How do I remove the decimal places from this to show just whole pounds? The formatting of numeric values is controlled by your clientapplication, not by SQL Server and that's how it should be. ROUND the value on the server if you need to but do presentation client-side. > What is the purpose of the small money data type ? Good question. In some cases the money types may save you 1 byte over aDECIMAL column. However, given the rounding errors caused when you divide or multiply the money types I would always avoid them unless compelled to use them. I can't think of a good reason to use MONEY or SMALLMONEY. -- David Portas SQL Server MVP -- > DECIMAL column. However, given the rounding errors caused when you Nor can I.> divide or multiply the money types I would always avoid them unless > compelled to use them. I can't think of a good reason to use MONEY or > SMALLMONEY. For the OP's benefit: http://www.aspfaq.com/2503 |
|||||||||||||||||||||||