• ffarouqi - Tuesday, February 13, 2018 1:59 PM

    Is there a better way or a more efficient way to write the attached stored proc that leans on to following best practice solution for writing a stored proc. For e.g can I add a try/catch block in this existing code or should I instead of declaring table variable should use temp tables etc. Any input would be highly appreciated.

    Yes there are better ways of doing this.
    😎
    Looking through the code, everything there can be optimized with this one exception

    ALTER PROCEDURE [dbo].[prEdPlanbyState]