Visual Studio's Alter Procedure statement gives "This statement is not recognized in this context"

Using Visual Studio 2012. Open SQL Server Object Explorer, open the database.

Click on an existing stored procedure and then right-click on the "View Code". This will open a window using the create procedure.

Now change "create" to "alter" to change the procedure. Visual Studio will give an error: SQL70001 :: This statement is not recognized in this context.

So, how do I change the procedure from Visual Studio?

EDIT

The solution to this problem is to copy all the text, close all windows, open a new script, paste it, and then it works fine.

Greg

+4
source share
2 answers

To change a stored procedure, syntax

ALTER procedure [dbo]. 
0
source

I had a similar problem and found a solution from this site .

The solution was to go into the properties window of the stored procedure and change the "Assembly action" setting to "None".

+1
source

Source: https://habr.com/ru/post/1499672/


All Articles