Reputation: 11
In SQL Server 2005
I have record like this
column_name
1.23424
4.32524
5.24123
7.84927
10.76192
2.77263
how to to SUM() just only 2 decimal?
column_name
1.23
4.33
5.24
7.85
10.76
2.77
thanks
Upvotes: 1
Views: 878
Reputation: 415931
You mean ROUND()?
But even that is tricky. Read the docs, and you'll see it still returns a plain numeric expression, which likely still includes trailing zeros. You may need to do extra string processing to get the exact display value you want, and that's likely better done on the client.
Upvotes: 2