• When I execute the SQL posted by Grasshopper that starts with:

    IF OBJECT_ID('tempdb..#ZZ_DeadlockEvents2008') IS NOT NULL Drop Table #ZZ_DeadlockEvents2008

    in a Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64) instance, I get:

    Msg 402, Level 16, State 1, Line 24

    The data types datetime and time are incompatible in the add operator.