Darshak Darshak - 3 years ago 174
SQL Question

Remove Zero from last in numeric in Sql Server from numeric

My values look like this.
I have numeric field in sql.

4.00
6.25
6.00
6.80
10.00
12.00


I want to display like

4
6.25
6
6.8
10
12


Thank in Advance!!!!

Answer Source

Just Pass your Numeric Value in '' in ROUND Function as below :

SELECT ROUND('4.00', 2)

SELECT ROUND('6.25', 2)

SELECT ROUND('6.00', 2)

SELECT ROUND('6.80', 2)

Result :

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download