• Quite some room for improvements, start by moving the parameters to the sp_executesql params and validating the inputs.

    😎