• One doubt mate, are u trying to run this piece of code in SSMS 2005 or SSMS 2008?