Reputation: 21
If the decimal part is 0.1 to 0.12, it rounds down to the next lower integer If the decimal part is 0.13 to 0.37 it rounds to 0.25 If the decimal part is 0.38 to 0.62 it rounds to 0.5 If the decimal part is 0.63 to 0.87 it rounds to 0.75 If the decimal part is 0.88 or more, it rounds up to the next higher integer
Upvotes: 2
Views: 1742
Reputation: 15834
I don't know the exact function name, but basically you use floor(4*x)/4. floor might be called int, to_int, or something like that.
Upvotes: -2
Reputation: 838696
There is a general method for this:
In SQL:
ROUND(column * 4) / 4
Upvotes: 3