• lmk1 (9/22/2016)


    I have it set to PRINT in the example code for testing purposes, but eventually I don't want to print, I want to drop.

    The PRINT is just so you can debug the dynamic SQL, it's not a fix, it's so you can see what fix is necessary.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass