Thank this author by sharing:
By Sourav Mukherjee, 2012/09/24
Execute the entire script using SQL Server Management Studio.
Do not remove the last 2 drop statements to delete the temporary tables.
As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.
Join us!
Steve Jones Editor, SQLServerCentral.com