Home Forums SQL Server 2008 T-SQL (SS2K8) Decimal Truncation in division RE: Decimal Truncation in division
Hariprasad.M
SSC Veteran
Points: 236
More actions
February 22, 2010 at 5:50 am
#1122872
Hi,
Try this,
SELECT CAST(CAST(1.67574 AS DECIMAL(38,10)) / CAST(10000 AS DECIMAL(38,10)) AS DECIMAL(38,10)) conv_factor
SQL server taking a default scale, you need to explicitly specify the precision and scale.
regards
Hari