SQL Snippet template

Screen Shot 08-10-16 at 09.28 AM 001

Screen Shot 08-10-16 at 09.35 AM

Screen Shot 08-10-16 at 09.28 AMsnippetsurround

Screen Shot 08-10-16 at 09.30 AM

[code language=”xml”]
<?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">Nigel</_locTag>
<_locTag _loc="locData">Description</_locTag>
<_locTag _loc="locData">Author</_locTag>
<_locTag _loc="locData">ToolTip</_locTag>
<_locTag _loc="locData">Default</_locTag>
</_locDefinition></pre>
<CodeSnippet Format="1.0.0">
<Header>
<Title>Item</Title>
<Shortcut>Item</Shortcut>
<Description>Example Snippet for Try-Catch.</Description>
<Author>SQL Server Books Online Example</Author>

<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>

<Declarations>
<Literal>
<ID>MyItemCode</ID>
<ToolTip>Code to handle the caught error</ToolTip>
<Default>CatchCode</Default>
</Literal>

</Declarations>

<Code Language="SQL">
<![CDATA[

DECLARE @myItemCode nvarchar(8)
Select @myItemCode = ”

–Select * from PRODMASTER where Item_code = @myItemCode

]]>

</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
<pre>[/code]

 

Leave a Comment