<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://mail.simple-talk.com/community/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Inside the tent....</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/default.aspx</link><description>Occasional Editorial announcements.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>Winners of the Bejewelled Puzzle</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/archive/2008/11/03/70343.aspx</link><pubDate>Mon, 03 Nov 2008 17:10:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:70343</guid><dc:creator>Andrew Clarke</dc:creator><slash:comments>0</slash:comments><comments>http://mail.simple-talk.com/community/blogs/andrew_clarke/comments/70343.aspx</comments><wfw:commentRss>http://mail.simple-talk.com/community/blogs/andrew_clarke/commentrss.aspx?PostID=70343</wfw:commentRss><description>&lt;p&gt;There are three winners:&lt;/p&gt;
 &lt;ul&gt;
&lt;li&gt;&lt;b&gt;Timothy Walters&lt;/b&gt;  - for his second solution with the offset table; &lt;i&gt;He gets a $50 Amazon Voucher.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Ryan Randall&lt;/b&gt; – for his first and second solutions;&lt;i&gt; He gets a choice between a license for SQL Prompt and SQL Data Generator&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;DrLechter&lt;/b&gt; – for his first and second solutions; &lt;i&gt;He gets a choice between a license for SQL Prompt and SQL Data Generator&lt;/i&gt;&lt;/li&gt;
 &lt;/ul&gt;
&lt;p&gt;Timothy Walters's solution is very simple and elegant. Almost all of the logic has been implemented in the lookup table and that makes the solution portable and flexible.&lt;/p&gt;
&lt;p&gt;In addition, his solution can be easiely modified in order to show the directions of the moves by adding one more column to the offset table.
 &lt;/p&gt;&lt;p&gt;
Here is how it can be done:
 &lt;/p&gt;
 
&lt;pre&gt;&lt;font color="black"&gt;&lt;br&gt;&lt;/font&gt;&lt;font color="green"&gt;--====== Table matches needs to be loaded only once&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;CREATE TABLE &lt;/font&gt;&lt;font color="black"&gt;matches&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;offsetRow1 &lt;/font&gt;&lt;font color="blue"&gt;INT&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;offsetCol1 &lt;/font&gt;&lt;font color="blue"&gt;INT&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;offsetRow2 &lt;/font&gt;&lt;font color="blue"&gt;INT&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;ofsetCol2 &lt;/font&gt;&lt;font color="blue"&gt;INT&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;directions &lt;/font&gt;&lt;font color="blue"&gt;VARCHAR&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;20&lt;/font&gt;&lt;font color="gray"&gt;))&lt;br&gt;&lt;/font&gt;&lt;font color="green"&gt;-- for horizontal &lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;(-&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'up'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;(-&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'up'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;(-&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'up'&lt;/font&gt;&lt;font color="gray"&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'down'&lt;/font&gt;&lt;font color="gray"&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'down'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'down'&lt;/font&gt;&lt;font color="gray"&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;3&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'left'&lt;/font&gt;&lt;font color="gray"&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;3&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'right'&lt;/font&gt;&lt;font color="gray"&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;/font&gt;&lt;font color="green"&gt;-- for verical&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;(-&lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'left'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;(-&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'left'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'left'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;(-&lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'right'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;(-&lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'right'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;1&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'right'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;(-&lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;, -&lt;/font&gt;&lt;font color="black"&gt;3&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'up'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;INSERT INTO &lt;/font&gt;&lt;font color="black"&gt;matches &lt;/font&gt;&lt;font color="blue"&gt;VALUES&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;2&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;3&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="red"&gt;'down'&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt; &lt;br&gt;&lt;/font&gt;&lt;font color="green"&gt;--==================================================&lt;br&gt;&lt;/font&gt;&lt;font color="gray"&gt;;&lt;/font&gt;&lt;font color="blue"&gt;WITH &lt;/font&gt;&lt;font color="black"&gt;CTE&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;AS&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;(&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;SELECT&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;[Row] &lt;/font&gt;&lt;font color="blue"&gt;= &lt;/font&gt;&lt;font color="magenta"&gt;CAST&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;[#] &lt;/font&gt;&lt;font color="blue"&gt;AS INT &lt;/font&gt;&lt;font color="gray"&gt;),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;[Col] &lt;/font&gt;&lt;font color="blue"&gt;= &lt;/font&gt;&lt;font color="magenta"&gt;CAST&lt;/font&gt;&lt;font color="gray"&gt;( &lt;/font&gt;&lt;font color="black"&gt;[Col] &lt;/font&gt;&lt;font color="blue"&gt;AS INT &lt;/font&gt;&lt;font color="gray"&gt;),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;[Value]&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;FROM &lt;/font&gt;&lt;font color="black"&gt;bejeweled&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UNPIVOT &lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;[Value] &lt;/font&gt;&lt;font color="blue"&gt;FOR &lt;/font&gt;&lt;font color="black"&gt;[Col] &lt;/font&gt;&lt;font color="blue"&gt;IN &lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;[1]&lt;/font&gt;&lt;font color="gray"&gt;,&lt;/font&gt;&lt;font color="black"&gt;[2]&lt;/font&gt;&lt;font color="gray"&gt;,&lt;/font&gt;&lt;font color="black"&gt;[3]&lt;/font&gt;&lt;font color="gray"&gt;,&lt;/font&gt;&lt;font color="black"&gt;[4]&lt;/font&gt;&lt;font color="gray"&gt;,&lt;/font&gt;&lt;font color="black"&gt;[5]&lt;/font&gt;&lt;font color="gray"&gt;,&lt;/font&gt;&lt;font color="black"&gt;[6]&lt;/font&gt;&lt;font color="gray"&gt;,&lt;/font&gt;&lt;font color="black"&gt;[7]&lt;/font&gt;&lt;font color="gray"&gt;,&lt;/font&gt;&lt;font color="black"&gt;[8]&lt;/font&gt;&lt;font color="gray"&gt;,&lt;/font&gt;&lt;font color="black"&gt;[9]&lt;/font&gt;&lt;font color="gray"&gt;)) &lt;/font&gt;&lt;font color="black"&gt;unpvt&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;SELECT DISTINCT &lt;/font&gt;&lt;font color="black"&gt;T.Row&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;T.Col&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;T.Value&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;directions&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;FROM &lt;/font&gt;&lt;font color="black"&gt;CTE T&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;JOIN &lt;/font&gt;&lt;font color="black"&gt;CTE T1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;ON &lt;/font&gt;&lt;font color="black"&gt;T.Value &lt;/font&gt;&lt;font color="blue"&gt;= &lt;/font&gt;&lt;font color="black"&gt;T1.Value&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;JOIN &lt;/font&gt;&lt;font color="black"&gt;CTE T2&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;ON &lt;/font&gt;&lt;font color="black"&gt;T.Value &lt;/font&gt;&lt;font color="blue"&gt;= &lt;/font&gt;&lt;font color="black"&gt;T2.Value&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;JOIN &lt;/font&gt;&lt;font color="black"&gt;matches&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;ON &lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;T1.Row &lt;/font&gt;&lt;font color="gray"&gt;- &lt;/font&gt;&lt;font color="black"&gt;T.Row&lt;/font&gt;&lt;font color="gray"&gt;) &lt;/font&gt;&lt;font color="blue"&gt;= &lt;/font&gt;&lt;font color="black"&gt;offsetRow1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;AND (&lt;/font&gt;&lt;font color="black"&gt;T1.Col &lt;/font&gt;&lt;font color="gray"&gt;- &lt;/font&gt;&lt;font color="black"&gt;T.Col&lt;/font&gt;&lt;font color="gray"&gt;) &lt;/font&gt;&lt;font color="blue"&gt;= &lt;/font&gt;&lt;font color="black"&gt;offsetCol1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;AND (&lt;/font&gt;&lt;font color="black"&gt;T2.Row &lt;/font&gt;&lt;font color="gray"&gt;- &lt;/font&gt;&lt;font color="black"&gt;T.Row&lt;/font&gt;&lt;font color="gray"&gt;) &lt;/font&gt;&lt;font color="blue"&gt;= &lt;/font&gt;&lt;font color="black"&gt;offsetRow2&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;AND (&lt;/font&gt;&lt;font color="black"&gt;T2.Col &lt;/font&gt;&lt;font color="gray"&gt;- &lt;/font&gt;&lt;font color="black"&gt;T.Col&lt;/font&gt;&lt;font color="gray"&gt;) &lt;/font&gt;&lt;font color="blue"&gt;= &lt;/font&gt;&lt;font color="black"&gt;ofsetCol2&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;ORDER BY 
 &lt;/font&gt;&lt;font color="black"&gt;T.Row&lt;/font&gt;&lt;font color="gray"&gt;, &lt;/font&gt;&lt;font color="black"&gt;T.Col&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/pre&gt;
 
&lt;p&gt;There is one more person – AmandaS that should be specially mentioned. Her second solution was very similar to Timothy Walters' and Ryan Randall's solutions, but was submitted five days later.&lt;/font&gt;&lt;/p&gt;
 
&lt;p&gt;A few more people should be mentioned as well:&lt;/font&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Saharafrog &lt;/b&gt;– interesting solution&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Doug Stewart
&lt;/b&gt;
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Steve Munson&lt;/b&gt;  - his solution shows the coordinates of the cells that should be moved and the coordinates of destination cells
&lt;/li&gt;&lt;li&gt; &lt;b&gt;RBarry Young &lt;/b&gt;
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Dennis A&lt;/b&gt;
&lt;/li&gt;&lt;li&gt;&lt;b&gt;SkyBeaver
 &lt;/b&gt;
 &lt;/li&gt;&lt;/ul&gt;&lt;img src="http://mail.simple-talk.com/community/aggbug.aspx?PostID=70343" width="1" height="1"&gt;</description></item><item><title>Litigation, and the 'Production' of Documents.</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/archive/2008/10/24/70187.aspx</link><pubDate>Fri, 24 Oct 2008 17:59:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:70187</guid><dc:creator>Andrew Clarke</dc:creator><slash:comments>0</slash:comments><comments>http://mail.simple-talk.com/community/blogs/andrew_clarke/comments/70187.aspx</comments><wfw:commentRss>http://mail.simple-talk.com/community/blogs/andrew_clarke/commentrss.aspx?PostID=70187</wfw:commentRss><description>&lt;P&gt;Several recent events have been unsettling for many IT Managers. The recent collapse of banks has led to FBI investigations in the States, and groups of shareholders in the both the States and the UK have threatened litigation. At the time I write, there is evidence of criminal activity but not enough for prosecutions. There have also been price-fixing investigations by the UK's Office of Fair Trading. &lt;/P&gt;
&lt;P&gt;All these investigations have required the 'production' of documents. I've taken part in several of these, and they can be extraordinarily frustrating and time-consuming, even when there is no question of a cover-up. I've also had to find data for MI5 as part of terrorist investigations. It is, of course, the duty of IT management to ensure that all electronically-held data is easy to find and conforms with the company's 'Retention Policy'. &lt;/P&gt;
&lt;P&gt;Retention Policy?&lt;/P&gt;
&lt;P&gt;In businesses, there is a huge amount of electronic data kept. This is mostly done in case of litigation, but corporate lawyers are generally reluctant to give clear guidance about this. When litigators seek 'production' of documents from an opponent, as they have every right to do, the confusion and duplication in document archives can make life very difficult for the legal department. There have been numerous court cases that have generated serious sanctions when legal counsel and their clients failed to produce documents during this 'discovery' process or worse, pretended that they had been destroyed, or had never existed.&lt;/P&gt;
&lt;P&gt;'Discovery' is an expensive business, and the costs of litigation are enormously increased if lawyers cannot get hold of all the relevant documents. &lt;/P&gt;
&lt;P&gt;It is not enough just to store everything. In fact, it can make matters worse because of duplication. Everything has to be read by someone who is aware of the legal ramifications of what has been written. To be able to cope, business must specify in their 'Retention Policy' what needs to be retained in terms of&amp;nbsp; business risk, Business continuity, regulatory requirements, legal compliance, and statutory guidelines and requirements. These Policies must clearly state what data and documents can be discarded, and must be consistent across the enterprise.&lt;/P&gt;
&lt;P&gt;There may be business needs that may exceed those requirements due to the potential historic, intrinsic or enduring value of the information. If the information has met all of these needs and is no longer considered to be valuable it must be disposed of in a way that protects&amp;nbsp; privacy and confidentiality. &lt;/P&gt;
&lt;P&gt;Any data can become the subject of a legal hold, which means that its retention must be indefinite until the legal hold is removed.&lt;/P&gt;
&lt;P&gt;Emails cause unique problems because users rely on them for tracking projects and workflow. This makes any arbitrary 'disposal date' impossible. They also must be stored in such a way that they can be scrutinised. There can be no such thing as 'private emails' in the workplace. There have been several investigations where an email has proved to be the key evidence that has led to a criminal prosecution or the resignation of a politician &lt;/P&gt;
&lt;P&gt;ILM Applications are worse than useless without a consistent policy for the retention and access of documents. Automating a confusion will just make the confusion faster. The policy has to be enforced and tested to make sure that, in an emergency, all necessary documents can be found.&lt;/P&gt;
&lt;P&gt;I hope you never have to be involved in the litigation process. If you do, then the only way to cope is to have an effective policy, a way of disposing of all irrelevant or duplicate data, and the technology to search your data rapidly and effectively.&lt;/P&gt;&lt;img src="http://mail.simple-talk.com/community/aggbug.aspx?PostID=70187" width="1" height="1"&gt;</description></item><item><title>The LSE TradElect incident: We all lose</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/archive/2008/09/12/69502.aspx</link><pubDate>Fri, 12 Sep 2008 11:46:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:69502</guid><dc:creator>Andrew Clarke</dc:creator><slash:comments>1</slash:comments><comments>http://mail.simple-talk.com/community/blogs/andrew_clarke/comments/69502.aspx</comments><wfw:commentRss>http://mail.simple-talk.com/community/blogs/andrew_clarke/commentrss.aspx?PostID=69502</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The crash of the TradElect trading system on the London, and Johannesburg, Stock Exchange for seven hours was a disaster that probably led to the loss of around £3bn&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;in trading.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The system was based on SQL Server 2000.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;High volumes of trading on global exchanges were expected that day, following the news that Fannie Mae and Freddie Mac were being taken over. At 9:15 AM GMT, the Exchange's software failed due to "connectivity issues." It took Six-hours and 45-minutes for the London Exchange, along with the Johannesburg Stock Exchange, once more to start trading.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;This incident has put a new question-mark on the LSE’s viability. &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;In terms of cost, it is one of the most spectacular in recent history&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The system was built, evidently, built using Windows Server 2003, SQL Server 2000, and a custom .NET application in C# by Microsoft and Accenture. Microsoft described the application as being ‘One hundred per cent reliable on high-volume trading days’ &lt;A href="http://www.microsoft.com/uk/getthefacts/lse.mspx"&gt;http://www.microsoft.com/uk/getthefacts/lse.mspx&lt;/A&gt;. &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;The TradElec runs on more than a 100 HP ProLiant servers in several locations in London. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The system promised to give sub-ten millisecond response times, rather than 7 hour response times.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The LSE describe TradElect in their website as ‘…the Exchange’s new trading system. It brings unprecedented levels of performance, enhanced functionality and new services to our markets whilst maintaining our exemplary record for reliability.’ &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;A spokesman told Reuters on Tuesday. "It was software-related, a coincidence, due to two processes we couldn't have foreseen, We've introduced a fix and we're confident it will not happen again.". She said the fault was not due to high trading volume. "That's a red herring. We were able to eliminate that pretty quickly." &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So what was it? &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Another statement attributed the failure to network software issues between the LSE's Extranex private network (which links the exchange and clients) and the trading gateway to TradElect.. As yet, there is no confirmation of this by Cisco.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The whole incident has had the Linux world rubbing their hands with glee and maintaining that Microsoft technology just wasn’t up to it. Some commentators have even tried to make out that &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the LSE would have done better with a LAMP-based system with MsSQL.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The whole incident has been a major embarrassment for Microsoft since they made so much of the reliability of the system. Once the amusement of searching Microsoft sites for references to TradElect has waned, though, there comes the thought that, despite the crowing of the Linux gurus, &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;it is quite likely that&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;it had nothing whatsoever to do with the Microsoft technology, and it really was a problem with the software within the network. If this was the case, why hasn’t a statement been made? The delay is bad news because, &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the meantime, what damages the reputation of TradElect , also damages confidence in the Windows Server, SQL Server , and NET platform. It was, after all, going to be the ‘benchmark’ application for the platform.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://mail.simple-talk.com/community/aggbug.aspx?PostID=69502" width="1" height="1"&gt;</description></item><item><title>Pasting code into a Blog.</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/archive/2008/07/15/62485.aspx</link><pubDate>Tue, 15 Jul 2008 13:45:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:62485</guid><dc:creator>Andrew Clarke</dc:creator><slash:comments>1</slash:comments><comments>http://mail.simple-talk.com/community/blogs/andrew_clarke/comments/62485.aspx</comments><wfw:commentRss>http://mail.simple-talk.com/community/blogs/andrew_clarke/commentrss.aspx?PostID=62485</wfw:commentRss><description>&lt;p&gt;One reason that I often hear for the apparent inability of certain people to blog is that there is no way for Community Server to display code. It isn't actually that hard. The obvious choice is to use &lt;a href="http://extras.sqlservercentral.com/prettifier/prettifier.aspx?skin=st"&gt;Phil Factor's prettifier&lt;/a&gt;. It is the reason he wrote it. If you need to show exactly what is in Visual Studio, or SSMS, there is another way. &lt;/p&gt;
&lt;p&gt;The problem you have is that Community Server is usually set to only allow FONT tags to enhance text. This makes life difficult, though it ensures that a blogger can't cause too much havoc with surrounding parts of the page.&lt;/p&gt;
&lt;p&gt;Paste your code into Word. Make sure that it has pasted it in, using the 'keep source formatting' option. Then, save it as HTML. Alternatively, you can use Outlook. (I set the format of the message to be HTML. I then&amp;nbsp;send the code to myself, right-click the results and select 'view source code'.)&lt;/p&gt;
&lt;p&gt;I then take&amp;nbsp;the HTML code&amp;nbsp;into a nice text editor, 'top and tail' it (take out the HTML, BODY tags and the DIVs, leaving just the Ps in place) &amp;nbsp;and do the following substitutions with the objective of taking out the SPANs (no need really as they don't get rendered anyway) and changing the Ps into BRs&lt;/p&gt;
&lt;table cellpadding="5"&gt;

&lt;tr&gt;
&lt;th&gt;FROM&lt;/th&gt;
&lt;th&gt;TO&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font face="Courier New" size="2"&gt;style='font-size:11.0pt;font-family:"Courier New"'&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;font face="Courier New" size="2"&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;font face="Courier New" size="2"&gt;Deleted all occurences&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font face="Courier New" size="2"&gt;&amp;lt;/p&amp;gt;\r\n&amp;lt;p class=MsoNormal&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;font face="Courier New" size="2"&gt;&amp;lt;BR&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;font face="Courier New" size="2"&gt;(this is RegEx) correct the spacing between lines. replace all paragraph tags with line break tabs&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;You may find that the font has been styled for a different size, depending on the setting in Visual Studio. This means that yo will need to remove &lt;font face="Courier New" size="2"&gt;style='font-size:10.0pt;font-family:"Courier New"' &lt;/font&gt;rather than 11.0pt. &lt;/p&gt;
&lt;p&gt;Then create, or edit, the blog. Paste the&amp;nbsp;modified code into the HTML pane (the tab is on the bottom-right of the panel in Community server) Select the code and, in the design pane, make the size of the code 2 rather than 3. Select the code and specify that it should be Courier&lt;br&gt;&lt;/p&gt;
&lt;p&gt;All that we're actually doing here is trying to remove all the &lt;strong&gt;Word&lt;/strong&gt; silliness of trying to be all things to all men. All you actually need is the colour information and the non-breaking spaces to do the indentation. The final substitution makes the paragraph tag render as you want it to.&lt;/p&gt;
&lt;hr&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;font color="blue" face="Courier New"&gt;&lt;span&gt;ALTER&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;span&gt; &lt;font color="blue"&gt;&lt;span&gt;Function&lt;/span&gt;&lt;/font&gt; [dbo]&lt;font color="gray"&gt;&lt;span&gt;.&lt;/span&gt;&lt;/font&gt;[ufsRemoveDelimited]&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @String &lt;font color="blue"&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;&lt;font color="fuchsia"&gt;&lt;span&gt;MAX&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;),&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @OpeningDelimiter &lt;font color="blue"&gt;&lt;span&gt;CHAR&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;1&lt;font color="gray"&gt;&lt;span&gt;),&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ClosingDelimiter &lt;font color="blue"&gt;&lt;span&gt;CHAR&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;1&lt;font color="gray"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="gray"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="blue" face="Courier New"&gt;&lt;span&gt;RETURNS&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;span&gt; &lt;font color="blue"&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;8000&lt;font color="gray"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="blue" face="Courier New"&gt;&lt;span&gt;AS&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;span&gt; &lt;font color="blue"&gt;&lt;span&gt;BEGIN&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;DECLARE&lt;/span&gt;&lt;/font&gt; @newString &lt;font color="blue"&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;8000&lt;font color="gray"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;IF&lt;/span&gt;&lt;/font&gt; @OpeningDelimiter &lt;font color="gray"&gt;&lt;span&gt;=&lt;/span&gt;&lt;/font&gt; @ClosingDelimiter &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;BEGIN&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;RETURN&lt;/span&gt;&lt;/font&gt; &lt;font color="gray"&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;END&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;IF&lt;/span&gt;&lt;/font&gt; @OpeningDelimiter &lt;font color="gray"&gt;&lt;span&gt;+&lt;/span&gt;&lt;/font&gt; @ClosingDelimiter &lt;font color="gray"&gt;&lt;span&gt;+&lt;/span&gt;&lt;/font&gt; @String &lt;font color="gray"&gt;&lt;span&gt;IS&lt;/span&gt;&lt;/font&gt; &lt;font color="gray"&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;BEGIN&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;RETURN&lt;/span&gt;&lt;/font&gt; @String &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;END&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;/font&gt;&amp;nbsp; @NewString &lt;font color="gray"&gt;&lt;span&gt;=&lt;/span&gt;&lt;/font&gt; &lt;font color="red"&gt;&lt;span&gt;''&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;/font&gt;&amp;nbsp; @newString &lt;font color="gray"&gt;&lt;span&gt;=&lt;/span&gt;&lt;/font&gt; @newString &lt;font color="gray"&gt;&lt;span&gt;+&lt;/span&gt;&lt;/font&gt; &lt;font color="fuchsia"&gt;&lt;span&gt;SUBSTRING&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;@String&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt; number&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt; 1&lt;font color="gray"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; numbers&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;WHERE&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp; number &lt;font color="gray"&gt;&lt;span&gt;&amp;lt;=&lt;/span&gt;&lt;/font&gt; &lt;font color="fuchsia"&gt;&lt;span&gt;LEN&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;&lt;font color="fuchsia"&gt;&lt;span&gt;REPLACE&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;@string&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt; &lt;font color="red"&gt;&lt;span&gt;' '&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt; &lt;font color="red"&gt;&lt;span&gt;'|'&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;))&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="gray"&gt;&lt;span&gt;AND&lt;/span&gt;&lt;/font&gt; &lt;font color="fuchsia"&gt;&lt;span&gt;CHARINDEX&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;@OpeningDelimiter&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt; @string &lt;font color="gray"&gt;&lt;span&gt;+&lt;/span&gt;&lt;/font&gt; @OpeningDelimiter&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; number&lt;font color="gray"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt; &lt;font color="gray"&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;/font&gt; &lt;font color="fuchsia"&gt;&lt;span&gt;CHARINDEX&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;@ClosingDelimiter&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @string &lt;font color="gray"&gt;&lt;span&gt;+&lt;/span&gt;&lt;/font&gt; &lt;font color="red"&gt;&lt;span&gt;' '&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="gray"&gt;&lt;span&gt;+&lt;/span&gt;&lt;/font&gt; @closingDelimiter&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt; number&lt;font color="gray"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="gray"&gt;&lt;span&gt;AND&lt;/span&gt;&lt;/font&gt; number &lt;font color="gray"&gt;&lt;span&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;/font&gt; &lt;font color="fuchsia"&gt;&lt;span&gt;CHARINDEX&lt;/span&gt;&lt;/font&gt;&lt;font color="gray"&gt;&lt;span&gt;(&lt;/span&gt;&lt;/font&gt;@OpeningDelimiter&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt; @string&lt;font color="gray"&gt;&lt;span&gt;,&lt;/span&gt;&lt;/font&gt; number&lt;font color="gray"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt; &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;RETURN&lt;/span&gt;&lt;/font&gt; @NewString &lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;END&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Arial"&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr&gt;

&lt;p&gt;Here is some C#, copied out of Visual Studio 2005&lt;/p&gt;
&lt;hr&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;font color="green" face="Courier New"&gt;&lt;span&gt;// Marshal.cs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="blue" face="Courier New"&gt;&lt;span&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;span&gt; System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="blue" face="Courier New"&gt;&lt;span&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;span&gt; System.Runtime.InteropServices;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="blue" face="Courier New"&gt;&lt;span&gt;class&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;span&gt; PlatformInvokeTest&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;font color="#2b91af"&gt;&lt;span&gt;DllImport&lt;/span&gt;&lt;/font&gt;(&lt;font color="#a31515"&gt;&lt;span&gt;"msvcrt.dll"&lt;/span&gt;&lt;/font&gt;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;public&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;static&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;extern&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;int&lt;/span&gt;&lt;/font&gt; puts(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;font color="#2b91af"&gt;&lt;span&gt;MarshalAs&lt;/span&gt;&lt;/font&gt;(&lt;font color="#2b91af"&gt;&lt;span&gt;UnmanagedType&lt;/span&gt;&lt;/font&gt;.LPStr)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;string&lt;/span&gt;&lt;/font&gt; m);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;font color="#2b91af"&gt;&lt;span&gt;DllImport&lt;/span&gt;&lt;/font&gt;(&lt;font color="#a31515"&gt;&lt;span&gt;"msvcrt.dll"&lt;/span&gt;&lt;/font&gt;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;internal&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;static&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;extern&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;int&lt;/span&gt;&lt;/font&gt; _flushall();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;public&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;static&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;void&lt;/span&gt;&lt;/font&gt; Main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts(&lt;font color="#a31515"&gt;&lt;span&gt;"Hello World!"&lt;/span&gt;&lt;/font&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _flushall();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/font&gt;&lt;font face="Arial"&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr&gt;

&lt;p&gt;Here is a small sample of VB code&lt;/p&gt;
&lt;hr&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;font color="blue" face="Courier New"&gt;&lt;span&gt;Private&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;span&gt; &lt;font color="blue"&gt;&lt;span&gt;Sub&lt;/span&gt;&lt;/font&gt; Button1_Click(&lt;font color="blue"&gt;&lt;span&gt;ByVal&lt;/span&gt;&lt;/font&gt; sender &lt;font color="blue"&gt;&lt;span&gt;As&lt;/span&gt;&lt;/font&gt; System.Object, _&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;ByVal&lt;/span&gt;&lt;/font&gt; e &lt;font color="blue"&gt;&lt;span&gt;As&lt;/span&gt;&lt;/font&gt; System.EventArgs) &lt;font color="blue"&gt;&lt;span&gt;Handles&lt;/span&gt;&lt;/font&gt; Button1.Click&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="green"&gt;&lt;span&gt;' Stores the return value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;Dim&lt;/span&gt;&lt;/font&gt; RetVal &lt;font color="blue"&gt;&lt;span&gt;As&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;Integer&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RetVal = MBox(0, &lt;font color="#a31515"&gt;&lt;span&gt;"Declare DLL Test"&lt;/span&gt;&lt;/font&gt;, &lt;font color="#a31515"&gt;&lt;span&gt;"Windows API MessageBox"&lt;/span&gt;&lt;/font&gt;, _&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MB_ICONQUESTION &lt;font color="blue"&gt;&lt;span&gt;Or&lt;/span&gt;&lt;/font&gt; MB_YESNO)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="green"&gt;&lt;span&gt;' Check the return value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;If&lt;/span&gt;&lt;/font&gt; RetVal = IDYES &lt;font color="blue"&gt;&lt;span&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox(&lt;font color="#a31515"&gt;&lt;span&gt;"You chose Yes"&lt;/span&gt;&lt;/font&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox(&lt;font color="#a31515"&gt;&lt;span&gt;"You chose No"&lt;/span&gt;&lt;/font&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="blue"&gt;&lt;span&gt;End&lt;/span&gt;&lt;/font&gt; &lt;font color="blue"&gt;&lt;span&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="blue" face="Courier New"&gt;&lt;span&gt;End&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;span&gt; &lt;font color="blue"&gt;&lt;span&gt;Sub&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Arial"&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://mail.simple-talk.com/community/aggbug.aspx?PostID=62485" width="1" height="1"&gt;</description></item><item><title>RSS feeds on the site</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/archive/2008/04/17/47697.aspx</link><pubDate>Thu, 17 Apr 2008 09:01:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:47697</guid><dc:creator>Andrew Clarke</dc:creator><slash:comments>0</slash:comments><comments>http://mail.simple-talk.com/community/blogs/andrew_clarke/comments/47697.aspx</comments><wfw:commentRss>http://mail.simple-talk.com/community/blogs/andrew_clarke/commentrss.aspx?PostID=47697</wfw:commentRss><description>&lt;P&gt;There a number of RSS feeds on the Simple-Talk site. For historical reasons, these feeds are tucked away in a number of different places on the site. Just for convenience, I'm putting them here.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="/feed/"&gt;Main Site Feed&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;IMG height=14 alt=rss src="/images/interface/icon_rss_36x14.gif" width=36 border=0&gt; &lt;/A&gt;
&lt;LI&gt;&lt;A href="/community/blogs/mainfeed.aspx"&gt;Main Blog Feed&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;IMG height=14 alt=rss src="/images/interface/icon_rss_36x14.gif" width=36 border=0&gt; &lt;/A&gt;
&lt;LI&gt;&lt;A href="/community/blogs/philfactor/rss.aspx"&gt;Phil Factor's Blog&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG height=14 alt=rss src="/images/interface/icon_rss_36x14.gif" width=36 border=0&gt; 
&lt;LI&gt;&lt;A href="/community/blogs/tony_davis/rss.aspx"&gt;Tony Davis's Blog&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;IMG height=14 alt=rss src="/images/interface/icon_rss_36x14.gif" width=36 border=0&gt; 
&lt;LI&gt;&lt;A href="/community/blogs/brian_donahue/rss.aspx"&gt;Brian Donahue's Blog &lt;IMG height=14 alt=rss src="/images/interface/icon_rss_36x14.gif" width=36 border=0&gt; 
&lt;LI&gt;&lt;A href="/community/forums/rss.aspx?ForumID=142&amp;amp;Mode=0"&gt;SQL Server for Beginners Forum&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;IMG alt="View as RSS news feed in XML" src="/community/utility/images/rss.gif" border=0&gt; &lt;/A&gt;
&lt;LI&gt;&lt;A href="/community/forums/rss.aspx?ForumID=143&amp;amp;Mode=0"&gt;Programming SQL Server Forum &amp;nbsp;&amp;nbsp; &lt;IMG alt="View as RSS news feed in XML" src="/community/utility/images/rss.gif" border=0&gt; &lt;/A&gt;
&lt;LI&gt;&lt;A href="/community/forums/rss.aspx?ForumID=144&amp;amp;Mode=0"&gt;Administering SQL Server Forum&amp;nbsp; &amp;nbsp; &lt;IMG alt="View as RSS news feed in XML" src="/community/utility/images/rss.gif" border=0&gt; &lt;/A&gt;
&lt;LI&gt;&lt;A href="/community/forums/rss.aspx?ForumID=145&amp;amp;Mode=0"&gt;.NET framework Forum&amp;nbsp; &amp;nbsp; &lt;IMG alt="View as RSS news feed in XML" src="/community/utility/images/rss.gif" border=0&gt; &lt;/A&gt;
&lt;LI&gt;&lt;A href="/community/forums/rss.aspx?ForumID=146&amp;amp;Mode=0"&gt;.Windows Forms Forum&amp;nbsp;&amp;nbsp; &lt;IMG alt="View as RSS news feed in XML" src="/community/utility/images/rss.gif" border=0&gt; &lt;/A&gt;
&lt;LI&gt;&lt;A href="/community/forums/rss.aspx?ForumID=147&amp;amp;Mode=0"&gt;ASP.NET Forum&amp;nbsp;&amp;nbsp; &lt;IMG alt="View as RSS news feed in XML" src="/community/utility/images/rss.gif" border=0&gt; &lt;/A&gt;
&lt;LI&gt;&lt;A href="/community/forums/rss.aspx?ForumID=148&amp;amp;Mode=0"&gt;ADO.NET Forum&amp;nbsp; &lt;IMG alt="View as RSS news feed in XML" src="/community/utility/images/rss.gif" border=0&gt; &lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Each blogger actually has his own feed, but I've only listed the three most prolific bloggers.&lt;/P&gt;&lt;img src="http://mail.simple-talk.com/community/aggbug.aspx?PostID=47697" width="1" height="1"&gt;</description></item><item><title>A Prompt Delivery</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/archive/2008/04/02/46289.aspx</link><pubDate>Wed, 02 Apr 2008 08:57:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:46289</guid><dc:creator>Andrew Clarke</dc:creator><slash:comments>1</slash:comments><comments>http://mail.simple-talk.com/community/blogs/andrew_clarke/comments/46289.aspx</comments><wfw:commentRss>http://mail.simple-talk.com/community/blogs/andrew_clarke/commentrss.aspx?PostID=46289</wfw:commentRss><description>&lt;p&gt;I wandered into Red-Gate's offices the other day. I'd been momentarily  distracted by the autumn leaves, thoughtfully strewn in the hallway, probably by a visiting Zen Buddhist to remind us of  the sacred presence of nature even in the Techno Park. Suddenly I was waylaid by the charming Tanya to take part in a bug-hunt. Somehow, I found myself in a room full of laptop computers and various developers, varying from the apprehensive (SQL Prompt developers) to the smug (ex-SQL Prompt developers).
&lt;/p&gt;&lt;p&gt;
We were giving &lt;a href="http://www.red-gate.com/messageboard/viewtopic.php?t=6760"&gt;SQL Prompt 3.8 RC&lt;/a&gt; a quick post-test check-over before the new release candidate version of 3.8 is made available. 
&lt;/p&gt;&lt;p&gt;The interesting thing about &lt;a href="http://www.red-gate.com/messageboard/viewtopic.php?t=6760"&gt;SQL Prompt 3.8&lt;/a&gt; is that it is now using the code reformatter from SQL Refactor to lay out your SQL code nicely. This means that, for the first time, even the users of Query Analyser now are able to reformat code automatically. There are twenty different aspects of the reformatting you can change, in four different sections. It is a very clever piece of code that, for me, doubles the usefulness of SQL Prompt. 
&lt;/p&gt;&lt;p&gt;
There are one or two other features that are less immediately exciting than the reformatting code but would make a big difference to me. One of these is the 'tooltips'-style help for whatever object that you rest the mouse pointer over. Wonderful. I'm an old-stager with IDEs. I like a nice clean window free from clutter, and loathe having to do incessant clicking in the Object Explorer to do stuff. This is why I reach for such old-time practices such as sp_help and sp_helptext.  If SQL Prompt can help me keep the clutter away so I can remind myself of the parameters to a routine or the columns of a table without having to scrub what's in the results window, then that's a real bonus. Other new features include Object Definitions, and a new Summary view in the schema panel.
&lt;/p&gt;&lt;p&gt;
SQL Prompt is one of those product that one can love, but never unconditionally. There are so many different ways that Database Developers work and it is presumptuous to think that it could ever be possible to construct a tool that would satisfy everyone. Perhaps that is why Microsoft have taken so long to provide intellisense for SQL Server developers. It has to work for such a diverse community of users. However, by diversifying into managing layout, and providing all these nice features for even those unfortunates still wrestling with SQL Server 2000, SQL Prompt's future is assured, whatever arrives by way of intellisense in SQL Server 2008.
&lt;/p&gt;&lt;p&gt;
I found SQL Prompt irritating to use until I adopted the obvious strategy of setting the triggering to manual (this should have been the default). Now you just invoke SQL Prompt just at the point of those senior moments when you forget the name of the table, routine or parameter. Another handy feature is being able to limit the trigger words that invoke SQL Prompt. There is a bit of work to do in order to make it function the way you want but the effort is worth it.
&lt;/p&gt;&lt;p&gt;
The Red-Gate bug-hunts are good fun for the huunters, but painful for the application developers whose work is being treated the same way as a fox by foxhunters. TallyHo! I sat next to a developer who had the habit of throwing his head back and laughing in an evil gloating way every time he found a bug. I gazed in wonderment at the restraint shown by SQL Prompt's developers whose welcoming smiles only glazed over momentarily in response to the baying pack of bug-hunters, as they pushed firmly into the back of their minds any homicidal instincts towards the gleeful bug-hunters 'on the scent'. There is a certain etiquette in conveying the news to a hard-working developer that there is a tiny flaw in his masterpiece.  Perhaps the pretence of amazed surprise that such a thing could possibly exist. Certainly, gloating or reproach is not an option, especially if, one day, the roles will be reversed, and it is your software being torn to shreds.
&lt;/p&gt;&lt;p&gt;
Fortunately, the software worked surprisingly well for a beta (it is now a release candidate as I write - 2nd April 2008) so we're getting it ahead of schedule. I, for one, will be pestering the developers over what I see as its little quirks and irritations, but I'm fully expecting people on &lt;a href="http://www.red-gate.com/messageboard/index.php"&gt;The Red-Gate Product Forum&lt;/a&gt;praising the very features I find irritating. That's all part of the software development process, I suppose&lt;/p&gt;&lt;img src="http://mail.simple-talk.com/community/aggbug.aspx?PostID=46289" width="1" height="1"&gt;</description></item><item><title>Coram magnificos  manifeste scalpere nolis ...</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/archive/2008/02/27/44573.aspx</link><pubDate>Wed, 27 Feb 2008 10:56:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:44573</guid><dc:creator>Andrew Clarke</dc:creator><slash:comments>1</slash:comments><comments>http://mail.simple-talk.com/community/blogs/andrew_clarke/comments/44573.aspx</comments><wfw:commentRss>http://mail.simple-talk.com/community/blogs/andrew_clarke/commentrss.aspx?PostID=44573</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;I&gt;'Coram magnificos manifeste scalpere nolis &lt;/I&gt;&lt;BR&gt;&lt;I&gt;Torquendo digitos nares…'&lt;/I&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P align=right&gt;&lt;FONT size=2&gt;Daniellis Becclesiensis c1200 AD&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;(meaning: &lt;/EM&gt;Do not pick your nose in front of managers)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;One of the delights of being Simple-Talk’s subeditor, under the watchful eye of Tony (sir), Anna and Simon, is to interact with our team of regular writers. When I use the word ‘Team’, I do so rather loosely, as writers come and go under the influences of the pressures of other work, or life events. By a strange coincidence we see the return of two regulars to the team after a gap of two years. &lt;/P&gt;
&lt;P&gt;This issue welcomes back &lt;B&gt;Amirthalingam Prasanna&lt;/B&gt;. Prasanna last wrote for us two years ago, and his five articles, with their clear tutorial style, have always been popular. He has returned with an update of his&lt;A href="/dotnet/.net-framework/.net-collection-management/"&gt; .NET Collection Management 08 December 2005&lt;/A&gt;&amp;nbsp; , called &lt;A href="/dotnet/.net-framework/.net-collection-management-with-c-3.0/"&gt;.NET Collection Management with C# &lt;/A&gt;We’d particularly like to cover Entity Framework on Simple-Talk, and we’re hoping that Prasanna will continue his output with a Cribsheet on the subject. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Richard Morris&lt;/B&gt;, being a professional journalist, does not suffer from the need for pencil-chewing and inspiration that affects most of our authors. He needs no encouragement: his articles are there, on time, every time, and are always stimulating to read. He writes best when he feels a genuine indignation about the subjects of his investigation, and in this article, where he investigates the troubling fact that almost all the British government IT contracts go to a handful of enormous multinational IT companies, &lt;A href="/opinion/opinion-pieces/level-playing-field/"&gt;the heat is palpable&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Phil Factor&lt;/B&gt; is not the most malleable of authors. Articles arrive with a quiet apology like ‘I know you wanted an article on maintenance plans, but this one just popped out.’ The article will be a &lt;A href="/opinion/opinion-pieces/captain-codd-and-the-simple-proposition/"&gt;mock pantomime&lt;/A&gt;, an &lt;A href="/community/blogs/philfactor/archive/2006/07/16/1257.aspx"&gt;elegy on indexes &lt;/A&gt;written in the style of Tennyson, or a treatise on the &lt;A href="/opinion/opinion-pieces/creation-by-committee/"&gt;difficulties of running a project&lt;/A&gt;, written in the style of GK Chesterton. I have before me Phil’s translation of Machiavelli, rewritten very slightly and chillingly contemporary. Also Phil’s translation of the mediaeval (twelfth century) latin poem ‘Urbanus Magnus’, by Daniellis Becclesiensis, phrased for the modern office-workers, from which I have taken the quote that starts this Blog.. It means ‘Do not pick your nose in front of managers’. (literally ‘In front of grandees, do not openly evacuate your nostril by twisting your finger’). Other advice from the great work includes ‘if the wife of your manager attempts to seduce you, feign illness, as this is a no-win predicament for you.’. It is the first book of etiquette ever written in Western Europe. &lt;/P&gt;
&lt;P&gt;Under &lt;B&gt;Robyn&lt;/B&gt;’s restraining influence, Phil’s work is more sober, and more consistent. Robyn is now on maternity leave but we are very fortunate that she continues to produce her articles for us, somehow taming Phil’s creative spirit. &lt;A href="/sql/database-administration/sql-server-alerts-soup-to-nuts/"&gt;‘The Alerts, Soup to Nuts’&lt;/A&gt; is their first attempt at a ‘&lt;A href="/search/default.aspx?search=soup"&gt;Soup to Nuts&lt;/A&gt;’ article. It all seemed so easy at first, evidently, but the more they got into the subject, ran tests and so on, the more they realised how little they understood of the subject. A quick rustle through the SQL Server Administration books convinced them that few others did either. The whole subject of tokens seemed to be completely neglected in many of the books on SQL Server Administration. After a long struggle, I think that the team succeeded well. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Arthur Fuller&lt;/B&gt; is a stalwart ‘Friend of Red-Gate’ whose first article for us was over two years ago. &lt;A href="/sql/sql-tools/the-database-from-hell/"&gt;The Database from Hell&lt;/A&gt;&amp;nbsp; is his fifth. This was supposed to be the first draft, but we liked its freshness so much we popped it in without the usual tidying and editing. We apologise in advance to the irate Scotsman who dislikes it when a Red-Gate product get a mention, but it was all part of the story. The illustration we used was adapted from &lt;B&gt;Eric Liberge&lt;/B&gt;’s ‘Tonnere Rampant’, with Eric’s permission, and we are delighted with it. He is a great illustrator, whose work deserves to be more widely known. &lt;/P&gt;
&lt;P&gt;The Simple-Talk newsletter continues to demand more attention than it should, because it seems to be unreasonably singled out by some versions of Microsoft Outlook as spam. Conspiracy theorists might have a field day with this, but it is very likely an over-zealous algorithm. We’ll be experimenting with the layout in the next few weeks and any opinions you have will be gratefully received. &lt;/P&gt;&lt;img src="http://mail.simple-talk.com/community/aggbug.aspx?PostID=44573" width="1" height="1"&gt;</description></item><item><title>Thick and Fast</title><link>http://mail.simple-talk.com/community/blogs/andrew_clarke/archive/2008/02/07/43718.aspx</link><pubDate>Thu, 07 Feb 2008 13:37:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:43718</guid><dc:creator>Andrew Clarke</dc:creator><slash:comments>0</slash:comments><comments>http://mail.simple-talk.com/community/blogs/andrew_clarke/comments/43718.aspx</comments><wfw:commentRss>http://mail.simple-talk.com/community/blogs/andrew_clarke/commentrss.aspx?PostID=43718</wfw:commentRss><description>There is a great deal of activity on the Red-Gate forums at the moment. In fact, they are a fascinating read. Often, the threads take off in ways that nobody can really predict. My particular pleasure is in reading the 'off the cuff' remarks such as 'I have servers in NYC, Los Angeles, Pakistan, and India.' or 'I imported roughly 200 servers with over a thousand databases. The servers are distributed throughout the mid-West', or 'The number of servers I will be supporting is jumping to over 200 in the next few months' that give a glimpse of life at the DBA coal-face. 
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;One of the best, if you haven't looked, is the thread that started off on the Refactor Forum. &lt;A href="http://www.red-gate.com/messageboard/viewtopic.php?t=3603&amp;amp;postdays=0&amp;amp;postorder=asc&amp;amp;start=0"&gt;Andras asked 'We support nearly forty options to customize laying out SQL, but is it enough?'.&lt;/A&gt; There were 41 responses, and the resulting thread was wildly popular. There are so many different ways of formatting SQL and there seemed to be an advocate for every one. &lt;/P&gt;Here is a subject where programmers will argue for hours. For example, although I agree with the great Joe Celco (SQL Programming Style 2005) about putting reserved words in Upper Case, we had people wanting everything in lower case. You're never going to please everybody, especially not Joe.&amp;nbsp; 
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;So, is there going to be a version that includes all the different layouts? &lt;A href="http://www.red-gate.com/messageboard/viewtopic.php?t=6321"&gt;Mike O'Neil wasn't the only one wanting to know.&lt;/A&gt; I'm a great fan of Refactor, but I've never quite tweaked the layout exactly how I want. Wthere wasn't great encouragement about a new version despite the interest in formatting. The &lt;A href="http://www.red-gate.com/about/roadmap.htm"&gt;roadmap&lt;/A&gt; only goes to the end of Q1 of this year so lets' hope Q2 for a new version as this is the Red-Gate tool I rely on the most. &lt;/P&gt;
&lt;P&gt;There is hope, though as &lt;A href="http://www.red-gate.com/about/roadmap.htm"&gt;SQL Prompt 3.8 will hopefully be available at the end of Q1.&lt;/A&gt; The Pro version evidently incorporates the Layout SQL functionality from SQL Refactor. It is an interesting move, since a lot of people aren't quite sure of the difference between the two products. and one wonders if the new Pro version will prove to be the logical line of development for the products &lt;/P&gt;
&lt;P&gt;SQL Prompt 3.7 patch release came out quietly, but the product is improving the whole time. I very quickly learned to set 'triggering' to manual (Cntl+Spacebar) when using SQL Prompt, and find it very handy as it cuts down on the need to keep accessing the Object Browser. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SQL Data compare forum &lt;A href="http://www.red-gate.com/messageboard/viewtopic.php?t=6049"&gt;had a wonderful thread where people were asking for enhancements to the product&lt;/A&gt; and Richard kept bobbing up and explaining that they were there already. For me it was rivetting to hear of extreme problems encountered by users such as 'tons of tables with no indexes'. &lt;/P&gt;
&lt;P&gt;Over on the Alpha/Beta forums, the buzz around the Data Generator is dying down now as the developers start to assimilate all the feedback, and code the good ideas into the next beta. Now &lt;A href="http://www.red-gate.com/messageboard/viewforum.php?f=77"&gt;it is the turn of Dan and the SQL Response Beta. &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As I write this, it is early days, and I suspect that there will be a huge diversity of opinion on the things that should be monitored in SQL Server to give it a health-check. In the pub, it is always a debate that ends in flushed faces and Beer-glasses getting thrown. &lt;/P&gt;
&lt;P&gt;The Red-Gate site now has Blogs. I must admit that I had slightly mixed feelings about this, probably because someone tried to copy the existing blogs across from Simple-Talk and all the comments dropped off like autumn leaves, causing much confusion. However, Neil rallied round and started cross-posting from &lt;A href="http://blog.businessofsoftware.org/2008/02/is-your-softwar.html"&gt;his wonderful blog on BusinessOfSoftware&lt;/A&gt;, However, the true purpose of the Red-Gate Blogs was illustrated best by David Connell in &lt;A href="http://blogs.red-gate.com/david_connell/archive/2008/01/15/how-to-write-a-generator-for-sql-data-generator-1-0-beta.aspx"&gt;How to write a Generator for SQL Data Generator 1.0 Beta&lt;/A&gt;, whereas over here, Lionel showed how well a Red-Gate developer could blog on Simple-Talk with his &lt;A href="/community/blogs/lionel/archive/2008/01/07/42301.aspx"&gt;SQL Puzzle 9&lt;/A&gt; &lt;/P&gt;&lt;img src="http://mail.simple-talk.com/community/aggbug.aspx?PostID=43718" width="1" height="1"&gt;</description></item></channel></rss>