Why when I update a field with 41.0000 does it save as 41 and not 41.0000?

Posted on 2005-05-12
Last Modified: 2011-10-03

Why when I update a field with 41.0000 does it save as 41 and not 41.0000?

The field is setup as type decimal, length 9, Precision 18, Scale 4

I need it to save as 41.0000.  Does anyone know how to fix this?

Question by:indy500fan
    LVL 17

    Accepted Solution

    if the data type is decimal(18,4) then the value will be stored in the database as 41.0000 It will be the presentation layer that is showing 41. e.g. if you are using enterprise manager to enter the data, it displays the data with trailing 0's removed. If you actually run a query (e..g in QA) you will see that the data is actually returned as 41.0000

    Author Comment

    Ah, okay.  You are right!  Thanks!

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Suggested Solutions

    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now