SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Can SQL Assistant modify ALTER scripts to insert comments?

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Can SQL Assistant modify ALTER scripts to insert comments?
Author Message
caderoux



Joined: 28 Dec 2009
Posts: 2
Country: United States

Post Can SQL Assistant modify ALTER scripts to insert comments? Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
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 View user's profile Send private message
caderoux



Joined: 28 Dec 2009
Posts: 2
Country: United States

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.