Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 311869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:57:51+00:00 2026-05-12T07:57:51+00:00

In my organization, the standard is to comment all stored procedures with a comment

  • 0

In my organization, the standard is to comment all stored procedures with a comment block that looks like this:

/*-- =============================================
-- Created by: Chris McCall
-- Created date: 08.05.2009
-- Purpose: Inserts new setting value, code and description
-- Modifications:
-- <Date> <Programmer> <Change>
-- =============================================*/

I don’t find this to be particularly useful, since the stored procedure is named usp_utl_CustomSettingsInsert anyway, and the comments are not guaranteed to be accurate. I usually ignore these blocks unless I have a problem and need to contact the original developer (who has long since departed, cackling maniacally, in a helicopter).

However, it’s not up to me, so I have to do this. Is there any way, with a trigger or some other SQL Server magic, to create these comment blocks with nothing more than the power of my mind?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:57:51+00:00Added an answer on May 12, 2026 at 7:57 am

    create a template in your editor

    EDIT

    If you want to alter the text of a procedure you can look at syscomments:

    select text from syscomments where id=object_id('YourProcedureName') order by colid
    

    If you put in long dummy tags like “<<:REPLACE XYZ:>>” in the source of the procedure, you could use: (I WOULD NEVER DO THIS AND DO NOT RECOMMEND THAT ANYONE ACTUALLY TRY THIS!!!)

    UPDATE syscomments
    set text=REPLACE(
                        REPLACE(text,'"<<:REPLACE NAME:>>','new name')
                        ,'"<<:REPLACE DATE:>>',GETDATE()
                    )
    where id=object_id('YourProcedureName')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have several legacy & 3'd-party systems in organization that use several RDBMS vendors
We have a bunch of documents in our organization that were inadvertently saved as
I am a member of a non-profit organization that has asked me to help
i have created my index and mapping by this JSON // 1st Mapping http://localhost:9200/hdm/entities/_mapping
I am trying to accomodate a corporate standard where all page-level javascript is contained
internally, our organization limits what servers and applications can send emails. I would like
My organization uses ColdFusion pages for most everything. The administration decides the standard layout,
I'd like to build a private Chrome extension that will be used within my
In our organization we're still using the IE8 standard. On one of our web-based
I work in an organization that relies heavily on technology standards. For the most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.