I created the proc and executed it. Got the following:
Msg 8134, Level 16, State 1, Procedure dba_QueryTimeDelta, Line 25
Divide by zero error encountered.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Any quick fixes available?
Nick