Toss that into a file and run it through Powershell. A word of warning: it will clobber any directory that you point it at for the output. The interesting thing here is that you can get the behavior that Mr. Leonard wants: a guarded 'drop procedure' and a 'create procedure' that's not in an sp_executesql. Have fun...but remember don't run with scissors!