unable to see user comments in store procedure

  • hi all ,

    i have written a store procedure as follows

    --procedure name usp_get_date

    --Author Ramu

    --Script Date 12/09/2009

    create procedure usp_getdate

    as

    begin

    select getdate();

    end

    few back i was able to see my comments written create statement. but now i cant find them what be the reason behind it.

    Regards

    Ramu

  • You should use a template to view your comments.

    Go to SSMS ---> View ---> Template Explorer. Right click on "SQL Server templates", choose "new template" and create one, for example:

    --procedure name .....

    --Author Ramu

    --Script Date 12/09/2009

    create procedure usp_yourproc

    as

    begin

    ...

    end

    If you use this template when creating a new procedure, you'll see the comments.

  • You should put your comments inside the procedure.

    Create procedure MyProc

    @param 1 int

    as

    /*

    Name MyProc

    Description: what my proc does

    Changes:

    20090922 sj Created proc

    */

    begin

    select @param

    return

  • Not sure, there could be something else he is missing out or if there are any client side settings that is preventing. I could write it outside the stored procedure and when I script it back again, I can see the comments. Thanks.

    Even this is also returning the stored proc script with comments (outside the sp)

    sp_helptext usp_getdate()

    ---------------------------------------------------------------------------------

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply