Reputation: 37905
Using Visual Studio 2012. Open Sql Server Object Explorer, open a database.
Click on an existing stored procedure and then right click on "View Code" This will open up a window with a Create Procedure.
Now, change 'create' to 'alter' in order to modify the procedure. Visual Studio will give the error: SQL70001 :: This statement is not recognized in this context.
So how do I alter a procedure from Visual Studio?
EDIT
The solution to this issue is to copy all the text, close all windows, open a new script, paste it in and then it works fine.
Greg
Upvotes: 10
Views: 8760
Reputation: 83
I had a similar problem and found the solution from this website.
The solution was to go into the property window of the stored procedure and change the Build Action setting to 'None'.
Upvotes: 3
Reputation: 3466
In order to modify the stored procedure, syntax is
ALTER procedure [dbo].
Upvotes: 0