dbTalk Databases Forums  

Number Data Types...

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Number Data Types... in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
WjWm
 
Posts: n/a

Default Number Data Types... - 05-06-2005 , 03:09 PM






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


Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Number Data Types... - 05-06-2005 , 04:52 PM






WjWm (warren.medernach (AT) imaginit (DOT) ca) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp


Reply With Quote
  #3  
Old   
David Portas
 
Posts: n/a

Default Re: Number Data Types... - 05-06-2005 , 04:52 PM



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
--



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.