SQL Snippet template

[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> Read More

SQL script my sample data

[code language=”sql”]</pre> &nbsp; –drop table MySampleData CREATE TABLE dbo.MySampleData ( ItemCode VARCHAR(10) NOT NULL, ItemName VARCHAR(20) NOT NULL, Color VARCHAR(10) NULL, LastUpdated DATETIME NOT NULL ) —————————— DECLARE @KeyString VARCHAR(10) DECLARE @DataString VARCHAR(20) DECLARE @Color VARCHAR(20) DECLARE @Random INT DECLARE @InsertDate DATETIME Read More