How to round up?

B

Beatrix

Hello!

My task is to round all up:
2.1=3
2.2=3
....
2.9=3
Is it possible to do in a query?
Thank you!
 
D

Dennis

That works if the Fieldname has a decimal but does not work for whole numbers.
2.1 will round to 3 but 2.0 will also round to 3
 
O

Ofer

You right, thank you for that.
--


Dennis said:
That works if the Fieldname has a decimal but does not work for whole numbers.
2.1 will round to 3 but 2.0 will also round to 3
 
J

James A. Fortune

Beatrix said:
Hello!

My task is to round all up:
2.1=3
2.2=3
...
2.9=3
Is it possible to do in a query?
Thank you!

SELECT Int([X]) + Abs([X] <> Int([X])) AS XRoundedUp FROM MyTable;

James A. Fortune
 
Top