• doodlingdba - Wednesday, September 20, 2017 5:08 AM

    Thanks for sharing Perry - I am getting an error about incorrect syntax on line 305 of the script:

        DELETE FROM #schperms WHERE GDR=@GDR AND ermission=@Permission">Permission=@Permission AND @PermClass=PermClass AND

    This is how it has copied out the text from this post, obviously something not right...

    the browser is doing something funny,
     highlight the line in ssms by double clicking the red error and change the code to read

    DELETE FROM #schperms WHERE GDR = @GDR AND Permission = @Permission AND @PermClass = PermClass AND @SrcSch = SrcSch AND @RoleName = RoleName AND PrincName = @Princname

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉