Bug causes snippet insertion after auto-creation of alias.

Provides intelligent code completion for SQL Server editors.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Paul Stephenson, Michelle Taylor, Mike Upton, justin.caldicott, Aaron Law

Bug causes snippet insertion after auto-creation of alias.

Postby sdelmore » Thu Feb 17, 2011 10:22 pm

Super simple case here....

select * from databases (enter space)

which results in automatically adding an alias giving you

select * from databases as d

then press enter to start your next line, say a join statement and have this happen

select * from databases as DELETE

I don't even have enter as an autocomplete key for my own snippets, for example if I type ij then press tab it will replace ij with INNER JOIN but if I press enter it just leaves it as ij, yet if I wrote

select * from IllogicalJargon it would create an alias named ij for me, then when I pressed enter it would replace ij with INNER JOIN.
Posts: 8
Joined: Wed Sep 23, 2009 10:53 pm

Postby PDinCA » Tue Jan 10, 2012 1:13 am

Folks are adding to a User Voice thread here: http://redgate.uservoice.com/forums/94413-sql-prompt-feature-suggestions/suggestions/2476473-don-t-create-alias-that-map-to-other-sql-prompt-sh?ref=title

Suggest anyone experiencing this BUG adds their vote to the pile so we all get a swift resolution to it... Nearly a year since this original post and it doesn't appear to be important enough to fix (maybe I'm wrong - sure hope so...)

I assigned the alias crt to my CacheRefreshTrigger table in the SQL Prompt list of aliases, so it should know that I don't want a declared alias expanded!

Code: Select all
                         FROM dbo.CacheRefreshTrigger crt
Code: Select all

                         FROM dbo.CacheRefreshTrigger CREATE TABLE
Posts: 517
Joined: Mon Jul 25, 2005 11:42 pm
Location: Costa Mesa, CA, USA

Postby Paul Stephenson » Fri May 25, 2012 8:20 am

Do you have SSMS Tools Pack installed as well? This has a SQL Snippets option, which by default has "D" as a snippet for DELETE, "CRT" for CREATE TABLE, and Enter as the snippet insertion key.

If this is the case then you can disable SSMS Tools Pack's snippets at SSMS Tools > SQL Snippets > Options....

Paul Stephenson
Project Manager, Red Gate
Paul Stephenson
Posts: 109
Joined: Fri Jul 23, 2010 9:22 am
Location: Cambridge, UK

Return to SQL Prompt 5

Who is online

Users browsing this forum: No registered users and 0 guests