Comments
2 comments
-
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!
TypedAND NOT EXISTS ( SELECT 1 FROM dbo.CacheRefreshTrigger crt
ResultingAND NOT EXISTS ( SELECT 1 FROM dbo.CacheRefreshTrigger CREATE TABLE ( )
Bad! -
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
Add comment
Please sign in to leave a comment.
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.