• I agree with Lynn,Mark and Bitbucket. The idea is to test the code against your system using your knowledge. If that means changing a variable - then change it. Not every database will have an Employees table - that was not the actual question. The question was to test how to get appropriate results from one of the Dynamic SQL statements.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events