• Thanks for sharing your findings. The code was written to work with SQL Server 2008/2008R2 and will have to be modified for sql 2005. I do have a link from databasejournal.com tha should help you. Please do test it before using it in production;

    🙂

    http://www.databasejournal.com/features/mssql/article.php/3737936/Top-Queries-in-SQL-Server-2005.htm

    Hope this helps. Remember to mark it as a solution if it does help you