The answer is here assuming you have regular stored procedures and you are working on the Development NON Production Server.
Go to Server Note >> Databases >> DatabaseName >> Programmability >> Stored Procedure
Now make sure that Object Explorer Details are open (if not open it by clicking F7). You will see the list of all the stored procedures there. Now you will see a list of all the stored procedures on the right side list. Select either all of them or the one which you believe are relevant to your query. Now…
Right click on the stored procedures >> SELECT DROP and CREATE to >> Now select New Query Editor Window or Clipboard.
Paste the complete script to a new window if you have selected Clipboard option. Now press Control+H which will bring up the Find and Replace Screen. In this screen insert the column to be replaced in the “Find What”box and new column name into “Replace With” box.
Now execute the whole script. As we have selected DROP and CREATE to, it will created drop the old procedure and create the new one.
Another method would do all the same procedure but instead of DROP and CREATE manually replace the CREATE word with ALTER world. There is a small advantage in doing this is that if due to any reason the error comes up which prevents the new stored procedure to be created you will have your old stored procedure in the system as it is. “
Well, this was my answer to the question which I have received. Do you see any other workaround or solution?
Reference : Pinal Dave (http://blog.SQLAuthority.com)
No comments:
Post a Comment