Do snippets support multiple variable expansion?

Provides intelligent code completion for SQL Server editors.

Do snippets support multiple variable expansion?

Postby rgelb » Mon Oct 08, 2012 10:50 pm

When I read snippets, I assumed SSMS or VS style snippets, except with less PITA experience. Unless I am missing something, the snippets in SQLPrompt5 are a more limited replacement. Please tell me it ain't so.

I want to quickly be able to group by a given column in a given table and sort by the count DESC.

SELECT DomainLogin, COUNT(*)
FROM Proposal
GROUP BY DomainLogin

So in this case there would be 2 varibles: column name (DomainLogin in this case) and table name (Proposal in this case).

It seems like SQL Prompt 5 supports $CURSOR$ for variables, but only a single one. And it definitely doesn't seem to support tabbing between variables, a la Visual Studio.

Am I wrong?
Posts: 28
Joined: Wed Sep 24, 2008 11:36 pm

Postby Manfred.Castro » Tue Oct 09, 2012 11:37 pm

Here is some documentation on using SSMS templates in SQL Prompt snippets.
Manfred Castro
Product Support
Red Gate Software
Posts: 209
Joined: Mon Apr 23, 2012 1:49 pm

Postby rgelb » Tue Oct 09, 2012 11:42 pm

Doesn't have the elegance of visual studio (or even SSMS) snippets, but I guess, it gets the job done.
Posts: 28
Joined: Wed Sep 24, 2008 11:36 pm

Postby David Atkinson » Tue Oct 09, 2012 11:59 pm

You can use the SSMS template parameters in conjunction with SQL Prompt snippets. Would this help?

see ... arameters/

David Atkinson
Posts: 1143
Joined: Mon Dec 05, 2005 3:54 pm
Location: Twitter: @dtabase

Postby eggnog » Fri Jan 25, 2013 3:03 am


Multiple $CURSOR$ positions with tab-between would be awesome.

Microsoft templates are lame because there is no autocomplete.

Posts: 1
Joined: Fri Jan 25, 2013 2:59 am

Return to SQL Prompt Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests