• One question though if you execute you should get error below,

    Msg 134, Level 15, State 1, Line 9

    The variable name '@sqlstring' has already been declared. Variable names must be unique within a query batch or stored procedure.

    once you fix the above may be your answer would right 🙂

    Cheer Satish 🙂