Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To: insert comment section at top of each SP
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01306459
Message ID:
01306463
Views:
4
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform