I'm using the format function to format a number, example:
select format(45.123,'###############.00')
print 45.12
select format(45.123,'###############.0')
print 45.1
There is some way to do this in the previous versions of sql server 2012