将整数向上舍入到最接近的15 [英] Round up integer to nearest 15
本文介绍了将整数向上舍入到最接近的15的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好。我很难在SQL Server 2008中将整数舍入/设置为下一个最接近的15(可分割)
2 = 15
30 = 30
134 = 145
我的尝试:
您好试过研究,但我能找到的只是日期时间
Hi. I'm having a hard time rounding up/setting an integer to the next nearest 15(divisible) in SQL Server 2008
2 = 15
30=30
134=145
What I have tried:
Hi tried researching but all I could find was for datetime
推荐答案
最终!
CEILING(编号* 1.0 / 15)* 15
finallly!
CEILING(number * 1.0 / 15) * 15
这篇关于将整数向上舍入到最接近的15的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文