• Frankly, I never understand why people do take the considerate effort to assemble and submit a question, along with an explanation and some believable answer options, and then don't take that tiny bet of extra effort to ensure no unintended syntax errors by copying and pasting their code in SSMS and hitting the execute button. That should not take more than a minute, tops!


    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/