• Getting error: Msg 197, Level 15, State 1, Line 19

    EXECUTE cannot be used as a source when inserting into a table variable.

    Msg 170, Level 15, State 1, Line 27

    Line 27: Incorrect syntax near 'try'.

    Msg 170, Level 15, State 1, Line 36

    Line 36: Incorrect syntax near 'try'.

    Msg 156, Level 15, State 1, Line 40

    Incorrect syntax near the keyword 'END'.