Don't create alias that map to other SQL Prompt shortcuts
When writing statements like 'ssf s [tab] [enter]' to produce the statement in exhibit A based on the prompt suggestions, the alias 's' gets interpreted as another shortcut for additional keywords as seen in exhibit B. It would be nice if SQL Prompt was aware of its own shortcuts and produced some other unique alias so it didn't collide and create parser errors
--Exhibit A
SELECT * FROM config.Service AS S
--Exhibit B
SELECT * FROM config.Service AS SELECT
I’m going to close this request because it looks like this was only an issue when the SSMS Tools Pack was installed – the solution was to disable snippets in the tools pack. If you’re still having problems with its snippets disabled then let me know.
-
Stephen commented
See Paul Stephenson's post about the possible conflict with the snippets feature of SSMS Tools (http://www.red-gate.com/MessageBoard/viewtopic.php?p=54897#54897).
Solved my problems!
-
Niall Hammond commented
If this change is made it should be an option setting as I go have snippets that intentionally end with a short code for another snippet
-
Stephen Anslow commented
And:
AND NOT EXISTS ( SELECT 1
FROM dbo.CacheRefreshTrigger crt
gets me:
AND NOT EXISTS ( SELECT 1
FROM dbo.CacheRefreshTrigger CREATE TABLE
(
)This is getting PAINFUL!
Please fix this crazy behavior...
-
Stephen Anslow commented
Absolutely agree. Auto-complete to a snippet that isn't listed is a royal PAIN! I use the alias "d" very frequently and get DELETED stuck in my code when I hit return. Even if I try to super-fast type d then return I get the unwanted expansion, so it appears to ignore any timing settings.
Please fix this behavior ASAP.