SQL SERVER 2014 Code Snippets missing

时光怂恿深爱的人放手 提交于 2019-12-10 16:51:59

问题


I'm trying to use the Snippets functionality in SQL Server.

I'm testing out adding new snippets to SQL Server 2014 following the instruction here.

Everything works fine except that after I added the snippet, it doesn't show up in the IntelliSense. Even more, I realized that not all build-in Snippets are showing up.

I wonder if anyone else has the same experience, and knows how to resolve this?

This is a list of build-in snippets under Function

And this is what I see from IntelliSense (3 of them are missing)


回答1:


The issue is likely in the definition of the snippets.

If you inspect your snippets you should see a section like:

<SnippetTypes>
    <SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>

Or

<SnippetTypes>
    <SnippetType>Expansion</SnippetType>
</SnippetTypes>

These indicate where the snippet can and will be used from.

In a query window you have 2 options when you right click:

  • Insert snippet
  • Surround with

Which give you the different options as you can see here:

This explains why you're not seeing the missing options when you try to insert a snippet.



来源:https://stackoverflow.com/questions/29701631/sql-server-2014-code-snippets-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!