• I tried the code and I got the following errors

    Server: Msg 8101, Level 16, State 1, Procedure sp_GetDDL2, Line 78

    An explicit value for the identity column in table '#Results' can only be specified when a column list is used and IDENTITY_INSERT is ON.

    Server: Msg 8101, Level 16, State 1, Procedure sp_GetDDL2, Line 344

    An explicit value for the identity column in table '#Results' can only be specified when a column list is used and IDENTITY_INSERT is ON.

    Server: Msg 8101, Level 16, State 1, Procedure sp_GetDDL2, Line 400

    An explicit value for the identity column in table '#Results' can only be specified when a column list is used and IDENTITY_INSERT is ON.