Здравствуйте, есть вопрос по Derby. Есть вычисление, которое выдает результат 17,86, как мне из этого числа получить число 18? Ни как не пойму, как округлить. Спасибо.
Delirium
04-06-2013, 06:27
Apache Derby doesn't support ROUND function to round off decimal value to some decimal places. Although there is work around for it. You can use this expression to round of value to 2 decimal places:
CAST(column + 0.005 AS DECIMAL(15,2))
Simple cast operation just drops the digit. So adding 0.005 in column will have the effect of rounding off.
Взято с http://www.seemoredata.com/en/showthread.php?132-Round-function-in-Apache-Derby
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.