Link to home
Start Free TrialLog in
Avatar of feesu
feesu

asked on

SQL Server 2005 - Modifying a Stored Procedure

Hi Experts,
I am using SQL 2005, and I need to modify one of existing stored procedures. How do I do that?
Whenever I try to edit and save, it saves it as an external file!
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In Management Studio open a new query window. Write:

USE <YourDatabaseName>
GO

EXEC sp_helptext <YourProcedureName>
GO

Then just copy the result (your procedure definition) into a new query window, replace word "CREATE" with "ALTER", change procedure body or whatever you need, make sure that you are using the proper database and execute the script.
Hi,

If you have an if exists ... drop ... create ... script, yes save sill save an external file.

You need to execute the query.

HTH
  David