Ceil or floor values using OQL

3
Is it possible to round numbers up or down to the next whole number in OQL? I know you can do this in SQL by putting CEIL() or FLOOR() around the argument retrieved in the SELECT part of your query like for instance SELECT CEIL(3.14). However this is not possible in OQL is it?
asked
1 answers
9

I think you're right that there's no FLOOR() or CEIL() function in OQL. However, you can use the ROUND() function to the same effect: FLOOR(x) = ROUND(x - 0.5) and CEIL(x) = ROUND(x + 0.5).

answered