round,ceiling 2 decimal points

Don Mercer picture Don Mercer · Oct 6, 2017 · Viewed 7.5k times · Source

I want to round up some figures that have 2 decimals points to 1. However, I always want it to round 1 examples of the list of figures in column amount

140.08 = 140.1
141.63 = 141.7

if I use round(141.63,1) it equals 142.6, but I want all the decimal points to round up, similar to the ceiling function. I want 141.7

Any help would be great?

thanks Don

Answer

Serkan Arslan picture Serkan Arslan · Oct 6, 2017

you can try this.

select ceiling(141.63 * 10) / 10.0 ,
       ceiling(140.08 * 10) / 10.0

Result

141.700000                              
140.100000