• 1. Thank you for the code.

    2. It wouldn't be extra to mention that this code will not work in SQL 2000 🙂