I copied out of the article and try to run the scripts. After multiple errors I gave up.It would be an advantage to publish scripts which are working instead of producing error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '?'.