• What compatibility level are you using?

    SELECT compatibility_level

    FROM sys.databases

    WHERE name = DB_NAME();


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/