• VegasL (1/14/2016)


    Thanks Guys do you mean something like this

    No, we mean it exactly as we wrote it. What you posted is a sort of random mish-mash of things we posted and things in your original code.

    Plus you added a reference to a column that is not even in the repro code you posted.

    Also, "Looks like running into error" is way too vague for us to offer any help. What is the error message you receive?


    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/