• Looks like an interesting proc, it would be great if you could post the formatted version.

    Here is SQL Server Central a forum to provide some assistance.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/