Competition: What’s your favorite Redgate tool? Enter now.

Using key commands within a snippet

Peter DaviesPeter Davies Posts: 5
edited April 13, 2015 4:48AM in SQL Prompt
I have an sql template that I am have assigned to a snippet which allows me to create standard stored procedures straight from MSSQL management studio, works like a charm.
However I have a parameter of the template that asks for the main table being used.
<Table,,> which is replaced in the stored proc template with whatever the table name is.

Then inside the template have a simple select * from <table,,>
which when run as a snippet produces a line of code , select * from tablename.
What I would like to be able to do is utilise the existing sql prompt 6 command that expands the wildcard by default. CntrlB + CntrlW are the keystrokes requried or tab in the query window. So select * from table name would become select col1,col2,col3 etc from tablename.

So is there a way to embedd any of the existing sql prompts within a snippet.

Comments

  • Aaron LAaron L Posts: 596 New member
    Hi Peter,

    Unfortunately there's no way to embed SQL Prompt commands inside snippets at the moment. We're currently working on a few improvements to snippets for the next version of SQL Prompt so there's potential for including this work too.

    We have a UserVoice forum that we use to track feature requests - would it be possible to add a new entry for your idea there? This allows other users vote on ideas which helps us prioritise work and it also allows us to update everyone who's interested in the idea when we have a new build to try.

    Thanks,
    Aaron.
  • Will put it in the uservoice forum
Sign In or Register to comment.