• m60freeman (6/11/2014)


    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.

    Since you don't have 24 lines in your example query I'd guess that you probably have a problematic DDL Trigger generating the error.