• Very nice! It is great to have useful little scripts like this. We create procs from scripts like this and add them to our UTIL schema to make it easy to find and use them from SSMS.

    Thanks for sharing.