Why temp tables is faster then variable table?

  • Hi Grant,

    We transfered the database to SQL 2014 this weekend, using TRACEON to workaroud the CE.

    However, another tiny problem occoured, and we were forced to downgrade the compatibility back to 2008.

    We had several queries like this example:

    SELECT DtEvent + HrEvent FROM Events

    where DtEvent datatype is DATETIME and HrEvent datatype is HOUR. In 2008, I can add and subtract this 2 columns. In 2012 and 2014, this returns "The data types datetime and time are incompatible in the add operator.". Due to this, we had to downgrade until we fix all the system.

    I wanna thank you all so much to help me with this issue. I opened a request on Microsoft about the CE situation. As soon they answer me, I'll post all the information here.

  • Thanks for the update.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply