> >declare @decDuration Decimal(10,2) >declare @tiDuration int > >-- We are going to store the duration initially in a decimal so that we can >-- round it to the nearest 5 minute value. This will take care >-- of 14,29,44,59 minute values > >set @decDuration=(Select defaultTime from coProc where procID=@tiProcID) > >-- Use the ceiling function to move it to the nearest 5 minute value >set @tiDuration=Ceiling(@decDuration/5)*5 > >declare @tiDurationIncrement int >set @tiDurationIncrement = @tiDuration/15 >>