Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Ceiling transaction

Author  Topic 

tuan83vnn
Starting Member

4 Posts

Posted - 2013-10-04 : 00:15:52
Dear
I have problem with ceiling transaction as below:
- select ceiling(55/60) = 0 : result of sql server
-> I want result = 1

as round up for ceiling
ex : ceiling(55/60) =1
ceiling(65/60) =2

Please help me the true transaction.

Thanks all


TuanTran

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-04 : 01:29:08
[code]
select ceiling(55*1.0/60)
[/code]

see
http://beyondrelational.com/modules/2/blogs/70/posts/10825/beware-of-implicit-conversions.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

tuan83vnn
Starting Member

4 Posts

Posted - 2013-10-04 : 02:47:22
Thank visakh16 very much.
Best regards

TuanTran
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-04 : 03:11:09
you're welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -