You can't highlight part of a procedure and run it as if you were running the procedure. You have to build the procedure and then execute it to test it.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning