RedsDevils
RedsDevils

Reputation: 1433

SQLServer 2008: Showing the Information with Money DataType in Classic ASP

I am using MS SQL 2008 to develop one system with Classic ASP.

I want to show 3 Decimal Places the field Datatype is money. I got answer from this http://www.sqlusa.com/bestpractices2005/moneyformat/ .

I use like this in my SQL Statement :

        CONVERT(VARCHAR, CAST(Sell_Price AS Decimal(19, 3))) AS Unit_Price

What I want to know is: Is there more effective way(in performance and usage) than my current one? If there is, please show me. Thanks in advance!

Regards,

RedsDevils

Upvotes: 1

Views: 567

Answers (1)

AdaTheDev
AdaTheDev

Reputation: 147314

Personally, I'd consider returning the value as-is unformatted from the database and formatting it for display in the UI instead - leave the formatting up to the front end. After all, the db doesn't know for what use the data it returns is being used for - e.g. something else that runs the query may want the full accuracy returned so would save having multiple different versions.

Upvotes: 1

Related Questions