• This would be a very useful procedure if I could get it to work. I'm getting a bunch of errors when I try to execute the create

    Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 28

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 39

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 50

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 78

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 90

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 99

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 101

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 123

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 136

    Incorrect syntax near '?'.

    I don't see anything near the lines mentioned that would be causing the syntax problems.