Sql – From a Query Window, can a Stored Procedure be opened into another Query Window

sqlsql-servertsql

Is there command inside a Query Window that will open a stored procedure in another Query Window?

i.e.
MODIFY dbo.pCreateGarnishmentForEmployee

I am using SQL Server management Studio 2005 and Red Gate's SQL Prompt.

Currently I have to do the follwowing multiple steps:

Open Object Explorer
Navigate Programmability | Stored Procedure
Right Click the Stored Procedure name
Select Modify

A Query Window will open up with the ALTER PROCEDURE.

As I mentioned above, what I would like to do is from a Query Window type
in something to the effect of

MODIFY dbo.pCreateGarnishmentForEmployee

Best Solution

You are trying to mix two technologies here.

  1. SQL and SQLSyntax
  2. The SQL Management Tool

It is probably not possible to use TSQL to manipulate the Management Studio, which is what you appear to want. I suspect cut and paste is your only option.