John86a
asked on
How to automatically delete all comments on thousands of procedures on a database?
As the title suggests I need to delete about 5-10 lines of comments on each procedure, but there are just TOO MANY of them..
Is there ANY way to automatize this task?
Thanks.
Is there ANY way to automatize this task?
Thanks.
You will have to build a T-SQL Script using the OBJECT_DEFINITION() function that retrieves the Stored Procedure text. Once you have it in a text file you can do whatever you need before re-running.
ASKER
That way I would need to do it manually (remove the comments), wouldn't I?
I was thinking more along the lines of something automatized, that detects every line that starts with -- and delete it from there..
I was thinking more along the lines of something automatized, that detects every line that starts with -- and delete it from there..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Exactly what I was looking for, thanks.