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.
| Author |
Topic |
|
skillile
Posting Yak Master
208 Posts |
Posted - 2002-09-30 : 22:30:25
|
| I am looking to round up my calc so I always have at least a value of 1 in my return.Here is what I want:3/2 = 25/10 = 10/x = 1I am trying:DECLARE @pages intSET @count = 100SET @pages = ROUND(@count/30,1)orSET @pages = CEILING(@count / 30)Any help:Thanksslow down to move faster... |
|
|
ashok
Yak Posting Veteran
57 Posts |
Posted - 2002-10-01 : 03:18:25
|
this should do it :DECLARE @pages int SET @count = 100 SET @pages = CEILING(@count / 30)select case @pages when 0 then 1 else @pages end |
 |
|
|
|
|
|