• Thanks for the help getting this script to work. It is not apparent immediately because you cannot see the extra spaces(blocks). You have to paste the script into notepad and then you can see the extra blocks at the beginning of each line.

    You also have to go to line 84 and add a space after @CurrentDB so the line looks like

    DECLARE @CurrentDB sysname

    Do this and the script works!

    Adam Durr
    Remote DBA support
    www.bluegecko.net