(case [IsReturned] when (0) then datediff(minute,dateadd(day,[Time],[StartDate]),getdate()) end)
delay = case when [IsReturned] = 0 then datediff(minute,dateadd(day,[Time],[StartDate]),getdate()) else delay end
(case [IsReturned] when (0) then datediff(minute,dateadd(day,[Time],[StartDate]),getdate()) else 1 end)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)