Home Forums SQL Server 2005 T-SQL (SS2K5) How to trim the decimal places? RE: How to trim the decimal places?
MTV
SSC Enthusiast
Points: 135
More actions
May 20, 2009 at 5:37 am
#997504
DECLARE @Num4 AS DECIMAL(10,4)
SET @Num4 = 1234.982644
SELECT LEFT(CONVERT(VARCHAR(20),@Num4),CHARINDEX('.',CONVERT(VARCHAR(20),@Num4))+2)