Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To: insert comment section at top of each SP
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01306459
Message ID:
01306463
Vues:
6
>I'm hoping someone has a script that already written that can do this, but I have to insert our standard company comment/copyright notice at the top of each stored procedure.
>
>/*---------------------------------------------------
>* Copyright 2008 CQI Solutions Inc.
>* 555 IH-35S Suite 310
>* New Braunfels, Texas 78130
>* All rights reserved
>*
>* Author: Kirk Kelly
>*--------------------------------------------------*/
>
>Hoping someone has done this before. Can't see doing it 2300+ times by opening each stored procedure.
>
>Thanks for any help, code or links
>
>Kirk

Hi Kirk,

Please check http://www.informit.com/articles/article.aspx?p=25288&seqNum=4

Get a list of all SPs with
SELECT name
FROM sys.objects
WHERE type = 'P'
And loop through this list using cursor to automatically insert headers using SP listed in this link.

Do you need more help writing this little procedure?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform