Rounding Up
I am doing a simple calculation and need to round up the output :
Here is my partial query :
SELECT SUM(cycleTime) / COUNT(urdn_number) AS ceiling(cycleTime), count(urdn_number) as totalCount,
sum(totalValue) as totalCost, Month_Status
FROM
(
SELECT distinct a.urdn_number,
DATEDIFF(day, a.Date_Arrived, b.activity_date) + 1 AS cycleTime,
The cycle time variable needs to round up but it keeps rounding down. What am I doing wrong ? I even had the ceiling before the sum but that still did not work.
For example, my numbers are 206/14 = 14.7 and should round p to 15 but I still get 14 as my output.
Please help, driving me nuts.
