Decimal data Type Display scale part as zero
Posted
by Wael Dalloul
on Stack Overflow
See other posts from Stack Overflow
or by Wael Dalloul
Published on 2010-05-08T11:14:56Z
Indexed on
2010/05/08
12:18 UTC
Read the original article
Hit count: 302
I have Decimal field in SQLserver 2005 table,
Price decimal(18, 4)
if I write 12 it will be converted to 12.0000, if I write 12.33 it will be converted into 12.3300. Always it's putting zero to the right of the decimal point in the count of Scale Part(4).
I was using these in SQL Server 2000, it was not behaving like this, in SQL Server 2000 if I put 12.5 it will be stored as 12.5 not as 12.5000 what SQLServer2005 do.
My Question is how to stop SQL Server 2005 from putting zeros to the right of the decimal point?
© Stack Overflow or respective owner