开发者

SQL Server SUM() 2 decimal

开发者 https://www.devze.com 2022-12-12 01:55 出处:网络
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 开发者_如何学Pythondecimal?

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 开发者_如何学Pythondecimal?

column_name
1.23
4.33
5.24
7.85
10.76
2.77

thanks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消