Ask the Expert

Displaying decimal places in SQL Server 2000

I am using the money data type in SQL Server 2000. When I display values on my production server (using ASP.NET), it shows two places after decimal, but on the live server it shows four digits after the decimal. What setting is required to get this rectified on my live server?

    Requires Free Membership to View

That is because your ASP.NET application is rounding them off. Money values are stored with 4 decimal places and you can find this explicitly documented in Books Online.

This was first published in November 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: