Created
January 14, 2015 15:53
-
-
Save craibuc/a48ce79de44c7fe53253 to your computer and use it in GitHub Desktop.
Sql Server Management Studio (SSMS) 2012, common-table expression (CTE), surround snippet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Purpose: wrap the selected SQL with <alias> AS ( <sql> ) | |
Installation: remove comments; add to C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SQL\Snippets\1033\Function | |
--> | |
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<_locDefinition xmlns="urn:locstudio"> | |
<_locDefault _loc="locNone" /> | |
<_locTag _loc="locData">Title</_locTag> | |
<_locTag _loc="locData">Description</_locTag> | |
<_locTag _loc="locData">Author</_locTag> | |
<_locTag _loc="locData">ToolTip</_locTag> | |
<_locTag _loc="locData">Default</_locTag> | |
</_locDefinition> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>CTE</Title> | |
<Shortcut></Shortcut> | |
<Description>Code Snippet for CTE construct.</Description> | |
<Author>Craig Buchanan</Author> | |
<SnippetTypes> | |
<SnippetType>SurroundsWith</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>Alias</ID> | |
<ToolTip>CTE's alias</ToolTip> | |
<Default>Alias</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="SQL"> | |
<![CDATA[ | |
$Alias$ AS ( | |
$selected$ $end$ | |
) | |
]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment