 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
caderoux
Joined: 28 Dec 2009 Posts: 2 Country: United States |
|
Can SQL Assistant modify ALTER scripts to insert comments? |
|
I'm using SQL Server 2005. I'd like to insert standardized comment blocks in all my SQL modules - stored procs, UDFs, and views.
The block would be standardized and I would want it to come after the AS
|
|
Mon Dec 28, 2009 1:47 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
You can create a custom code snippet with the text you want to insert. For example, let's call it as "+" or use any other letter or symbol. Snippets can be added via right-click menu Code Snippets -> Add Snippet. So name it + and enter the required text. Click OK to close the dialog and save new snippet in the settings.
Open the SQL code where you want to insert your text, place the cursor after AS, type + and then Ctrl+Enter. Hope that will do it for you. If you meant something else, please describe the process in more detail.
|
|
Mon Dec 28, 2009 2:37 pm |
|
 |
caderoux
Joined: 28 Dec 2009 Posts: 2 Country: United States |
|
|
|
I'd like to generate the ALTER scripts automatically to insert the standardized code comments in all the objects without having to manually insert them in the script.
|
|
Mon Dec 28, 2009 2:58 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
That is no possible. You cannot modify code after the fact (too late already),you still need to reopen the code and alter it, to get it done.
I guess, the best option is to use the "proc" and similar code snippets when designing the code, these snippets will to generate the required code headers and comments during create time.
|
|
Mon Dec 28, 2009 4:14 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|