• Hi Simon,

    I tried using this nice code in SQL Server 2005 but it fails with the message "Only functions and extended stored procedures can be executed from within a function".

    I was wondering how this could be updated to run in SQL Server 2005...I am not a DBA myself:-)

    Thanks!