Include Comments ABOVE the ALTER PROC statement

edited December 10, 2010 6:26AM in SQL Prompt Previous Versions
I like to put my header comment block ABOVE the ALTER PROCEDURE or CREATE PROCEDURE statement (similar to what you would see in C# code above a method definition). As long as it is within the same batch (between the GOs) this works fine and it is stored as part of the definition in SQL Server. If I right-click on a procedure in Object Explorer and choose Modify, SQL Server opens a window with the comment included.

But if I use SQL PROMPT snippet AP<tab> pick-the-name<tab> it only displays what came after the original ALTER PROCEDURE statement. And if I go ahead and execute that, then my comment is eliminated.

I have refreshed the cache before testing this, so it is not a problem of being out-of-date, just apparently not being there at all. It would be great if this would retrieve the full definition including my preceding comment.

Comments

  • This idea has been logged as Feature Request number SP-3499. Currently I am not able to say when this be changed, but the development team are aware of it.

    If you have any further suggestions/problems then please do not hesitate to let us know.
Sign In or Register to comment.