Number Data Types...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WjWm

    Number Data Types...

    Hello all,

    I'm kind of struggling with numeric data types...
    I have read alot of material, and think I have a 'decent' grasp on the
    various number data types and the effects of the scale and precision.

    However, I want to store a value of '1.0', and every variation I try
    still truncates the value.

    Is there a way to store 1.0 in a number data type?

    Thanks so much

    Warren M

  • Erland Sommarskog

    #2
    Re: Number Data Types...

    WjWm (warren.mederna ch@imaginit.ca) writes:[color=blue]
    > I'm kind of struggling with numeric data types...
    > I have read alot of material, and think I have a 'decent' grasp on the
    > various number data types and the effects of the scale and precision.
    >
    > However, I want to store a value of '1.0', and every variation I try
    > still truncates the value.
    >
    > Is there a way to store 1.0 in a number data type?[/color]

    I'm not sure that I understand how 1.0 could be truncated. Maybe you
    could illustrate with an example?


    --
    Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

    Books Online for SQL Server SP3 at
    Get the flexibility you need to use integrated solutions, apps, and innovations in technology with your data, wherever it lives—in the cloud, on-premises, or at the edge.

    Comment

    • David Portas

      #3
      Re: Number Data Types...

      I suspect that you are confusing datatype with formatting. The integer 1
      could be stored as ANY numeric datatype, but how that value is displayed
      will be controlled by your client application, not by SQL Server.

      --
      David Portas
      SQL Server MVP
      --


      Comment

      Working...