X is a float and I need to perform x/20 and round the result up to the
integer. So if result is 0.4 -> 1, if 1.1 -> 2.
How can I do this with SQL?
JIM.H. wrote:
> X is a float and I need to perform x/20 and round the result up to the
> integer. So if result is 0.4 -> 1, if 1.1 -> 2.
> How can I do this with SQL?
>
See CEILING in Books Online...
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||select ceiling(0.4), ceiling(1.1)
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
No comments:
Post a Comment