I am looking for a way to insert code comment blocks semi-automatically in all the views, stored procedures, and UDFs in a database (basically every code-based module). I'm fine with generating the ALTER statements and reviewing them myself before running the scripts, I was just looking for a reliable way to generate them. I am not looking for a method to alter the SSMS template, which will not help me alter the existing SQL modules
Obviously SPs contain AS
or AS BEGIN
, but views only contain AS
and I need to ensure that it takes account of varying whitespace.