| Author |
Message |
sdelmore
Joined: 23 Sep 2009 Posts: 8
|
Posted: Thu Feb 17, 2011 10:22 pm Post subject: Bug causes snippet insertion after auto-creation of alias. |
|
|
Super simple case here....
Type
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. |
|
| Back to top |
|
 |
PDinCA
Joined: 25 Jul 2005 Posts: 464 Location: Costa Mesa, CA, USA
|
Posted: Tue Jan 10, 2012 1:13 am Post subject: |
|
|
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!
Typed
| Code: |
AND NOT EXISTS ( SELECT 1
FROM dbo.CacheRefreshTrigger crt
|
Resulting
| Code: |
AND NOT EXISTS ( SELECT 1
FROM dbo.CacheRefreshTrigger CREATE TABLE
(
)
|
Bad! |
|
| Back to top |
|
 |
Paul Stephenson
Joined: 23 Jul 2010 Posts: 108 Location: Cambridge, UK
|
Posted: Fri May 25, 2012 8:20 am Post subject: |
|
|
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....
Regards,
Paul _________________ Paul Stephenson
Project Manager, Red Gate |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
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