Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Exactly 2 digits after decimal without Rounding Expand / Collapse
Author
Message
Posted Friday, September 28, 2007 9:27 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, April 4, 2007 7:42 AM
Points: 20, Visits: 1
Comments posted to this topic are about the item Exactly 2 digits after decimal without Rounding


Post #404089
Posted Tuesday, September 22, 2009 9:26 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 24, 2014 7:54 AM
Points: 13, Visits: 38
We can also use the below conversion to get the same result.

e.g to get only two digits after decimal for a value 6.0834298900

Select LTRIM(RTRIM(STR(6.0834298900,10,2)))

results in 6.08



Cheers,
Madhava.B
Post #791911
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse