A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
I think that your query executes GETDATE, then proceeds to read from database. During the preparations, some parallel process executes GETDATE almost simultaneously with your query and manages to write a row. Then your query reads this row. Therefore, your GETDATE is less than er.start_time. The negative difference is displayed as “23:59:59...”. Probably you can detect and display such negative results as 0 or as another smallest time value.