How can we help you today? How can we help you today?

new feature / functionality for code templates

Hi,

for a long time now I have kept some scripts that I use frequently in SSMS as a template. For example I have a couple of scripts to review index statistics that I find easier to drag from the templates toolbar than to locate from disk. They are written with the SSMS parameters in them so I hit Alt Q, Alt S and get prompted for the database to execute against etc and then just hit F5. These scripts are several hundred lines deep so I have never considered them 'snippets' and they have remained as templates rather than being converted. Their maintenance is simple as you can right click and edit to make changes and updates as needed

Is there any worth in having SQL Prompt refer to templates, or possibly a single templates folder, for longer scripts like this or should I take the pain and move my scripts into SQL Prompt? I just have this nagging feeling that the scripts wont evolve in the same way as the snippet editor isnt quite so available... If I had SQL Prompt giving me access to these templates from the keyboard (possibly have template based snippets begin with 'te_...' then it would give great integration with the SSMS environment.

To confirm, these arent shortcuts to sections of code to speed up writing of scripts they are fully functioning scripts that may need a parameter here or there completed and that, I think, is the distinction that means they are not snippets.

Does anyone else use templates like me? Does anyone have large scripts in templates or do you use the file system or SSMS solutions/projects? Is there a limit to the snippet size?

Jonathan
fatherjack2
0

Comments

1 comment

  • simon.jackson
    It's an interesting idea. I can see that keeping long frequently edited scripts as snippets might not be ideal, apart from anything else you can't use prompt whilst editing them! I'll record your asking for some management of templates, and we'll see if there's anything that could be done to help. Access to recently executed queries is something we've heard a few people asking for, and this idea seems like it might partner nicely with that.


    Thanks for the feedback

    Simon
    simon.jackson
    0

Add comment

Please sign in to leave a comment.