I am getting a bunch of syntax errors:
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 41
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 68
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 74
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 85
Incorrect syntax near '?'.
Msg 137, Level 15, State 2, Line 90
Must declare the scalar variable "@CurrentDB".
Msg 137, Level 15, State 2, Line 96
Must declare the scalar variable "@CurrentDB".
Msg 137, Level 15, State 2, Line 131
Must declare the scalar variable "@SQLCmd".
Msg 137, Level 15, State 2, Line 133
Must declare the scalar variable "@CurrentDB".
Msg 102, Level 15, State 1, Line 141
Incorrect syntax near '?'.
Any ideas? I have tried to clean up the script but still get errors.
Thanks.