Monday, March 12, 2012

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 MWjWm (warren.medernach@.imaginit.ca) writes:
> 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?

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@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||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
--

No comments:

Post a Comment