<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>zlika&#039;s</title>
	<atom:link href="http://zlika.org/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://zlika.org</link>
	<description>Think SMART!</description>
	<lastBuildDate>Fri, 06 Apr 2012 03:09:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Hola! Como estas?</title>
		<link>http://zlika.org/index.php/2012/04/05/hola-como-estas/</link>
		<comments>http://zlika.org/index.php/2012/04/05/hola-como-estas/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 03:09:33 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=768</guid>
		<description><![CDATA[
\m/
//


Hola! Como estas? 
Author: zlika (Peter Lalovsky), Category: Personal, %%comment_text%%



Add to:
Delicious &#124; 
Facebook &#124; 
Twitter &#124; Live &#124; 
Reddit &#124; 
Technorati &#124; 
Digg



Followers: Technorati &#124; Google



© 2012, zlika&#039;s (RSS)

Feed enhanced by Better Feed from  Ozh
]]></description>
			<content:encoded><![CDATA[<p><iframe width="500" height="375" src="http://www.youtube.com/embed/kUF2Hr4p00E?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>\m/<br />
//</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="Hola! Como estas?" href="http://zlika.org/index.php/2012/04/05/hola-como-estas/"><b>Hola! Como estas?</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/personal/" title="View all posts in Personal" rel="category tag">Personal</a>, <a href="http://zlika.org/index.php/2012/04/05/hola-como-estas/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2012/04/05/hola-como-estas/&title=Hola! Como estas?">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2012/04/05/hola-como-estas/&t=Hola! Como estas?">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2012/04/05/hola-como-estas/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2012/04/05/hola-como-estas/&title=Hola! Como estas?">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2012/04/05/hola-como-estas/&title=Hola! Como estas?">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2012/04/05/hola-como-estas/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2012/04/05/hola-como-estas/&title=Hola! Como estas?">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2012/04/05/hola-como-estas/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2012/04/05/hola-como-estas/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2012, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2012/04/05/hola-como-estas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My bass</title>
		<link>http://zlika.org/index.php/2011/08/31/my-bass/</link>
		<comments>http://zlika.org/index.php/2011/08/31/my-bass/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 04:03:25 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[2x10C]]></category>
		<category><![CDATA[american]]></category>
		<category><![CDATA[Bass]]></category>
		<category><![CDATA[deluxe]]></category>
		<category><![CDATA[fenfer]]></category>
		<category><![CDATA[precision]]></category>
		<category><![CDATA[swr]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=745</guid>
		<description><![CDATA[My bass is here&#8230; finally :-)



My bass 
Author: zlika (Peter Lalovsky), Category: Music, Personal, %%comment_text%%



Add to:
Delicious &#124; 
Facebook &#124; 
Twitter &#124; Live &#124; 
Reddit &#124; 
Technorati &#124; 
Digg



Followers: Technorati &#124; Google



© 2011, zlika&#039;s (RSS)

Feed enhanced by Better Feed from  Ozh
]]></description>
			<content:encoded><![CDATA[<p>My bass is here&#8230; finally :-)</p>
<p style="text-align: center;"><a href="http://zlika.org/wp-content/uploads/2011/08/1.jpg" rel="lightbox[745]"><img class="aligncenter size-full wp-image-746" title="Fender Precision American Deluxe + SWR 2x10C" src="http://zlika.org/wp-content/uploads/2011/08/1.jpg" alt="" width="472" height="629" /></a></p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="My bass" href="http://zlika.org/index.php/2011/08/31/my-bass/"><b>My bass</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/music/" title="View all posts in Music" rel="category tag">Music</a>, <a href="http://zlika.org/index.php/category/personal/" title="View all posts in Personal" rel="category tag">Personal</a>, <a href="http://zlika.org/index.php/2011/08/31/my-bass/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2011/08/31/my-bass/&title=My bass">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2011/08/31/my-bass/&t=My bass">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2011/08/31/my-bass/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2011/08/31/my-bass/&title=My bass">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2011/08/31/my-bass/&title=My bass">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2011/08/31/my-bass/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2011/08/31/my-bass/&title=My bass">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2011/08/31/my-bass/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2011/08/31/my-bass/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2011, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2011/08/31/my-bass/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to store UTF-8 data in SQL Server</title>
		<link>http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/</link>
		<comments>http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 22:09:02 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[SSMS]]></category>
		<category><![CDATA[Transact-SQL]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=704</guid>
		<description><![CDATA[Very frequently we need to use the data type UTF-8 to store a data in different languages. As described in the MSDN page the UTF-8 data type is stored in the &#8216;Samples&#8217; folder in SQL Server (Server\100\Samples\Engine\Programmability\CLR\UTF8String). You just need to activate it.

Create data type UTF-8
1. Generate a strong name key file
1.1. Open Command Prompt [...]]]></description>
			<content:encoded><![CDATA[<p>Very frequently we need to use the data type UTF-8 to store a data in different languages. As described in the <a title="Readme_UTF8 UDT Sample" href="http://msdn.microsoft.com/en-us/library/ms160893(SQL.100).aspx" target="_blank">MSDN page</a> the UTF-8 data type is stored in the &#8216;Samples&#8217; folder in SQL Server (Server\100\Samples\Engine\Programmability\CLR\UTF8String). You just need to activate it.</p>
<p><span id="more-704"></span><br />
<strong><span style="text-decoration: underline;">Create data type UTF-8</span></strong></p>
<p><strong>1. Generate a strong name key file</strong><br />
1.1. Open Command Prompt (Start &#8211;&gt; Run &#8211;&gt; &#8216;cmd&#8217;)<br />
1.2. Change directory (C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin)<br />
1.3. Generate the key (C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin&gt;sn -k &#8220;C:\Program Files\Microsoft SQL Server\100\Samples\SampleKey.snk&#8221;)</p>
<p><strong>2. Build the sample</strong><br />
2.1. Open Microsoft Visual Studio<br />
2.2. Open &#8216;C:\Program Files\Microsoft SQL Server\100\Samples\Engine\Programmability\CLR\UTF8String\CS\UTF8String.sln&#8217;<br />
2.3. Build &#8211;&gt; Build UTF8String</p>
<p><strong>3. Install UTF-8 data type</strong><br />
3.1. Open SQL Server Management Studio<br />
3.2. Open &#8216;C:\Program Files\Microsoft SQL Server\100\Samples\Engine\Programmability\CLR\UTF8String\Scripts\InstallCS.sql&#8217;<br />
3.3. Execute it<br />
3.4. Test UTF-8 data type (C:\Program Files\Microsoft SQL Server\100\Samples\Engine\Programmability\CLR\UTF8String\Scripts\Test.sql)<br />
3.4.1. Fix the error message &#8216;<span style="color: #ff0000;">Msg 6263, Level 16, State 1, Line 2<br />
Execution of user code in the .NET Framework is disabled. Enable &#8220;clr enabled&#8221; configuration option.</span>&#8216;</p>
<pre class="brush: sql;">
sp_configure 'clr enabled', 1;
RECONFIGURE;
</pre>
<p>3.4.2. Test UTF-8</p>
<pre class="brush: sql;">
DECLARE @u Utf8String;
SET @u = CONVERT(Utf8String, 'hello world');
SELECT
	@u.ToString()
	, CONVERT(varbinary(8000), @u)
	, SUBSTRING(@u.ToString(), 1, 5)
	, @u.Utf8Bytes;
</pre>
<div id="attachment_732" class="wp-caption aligncenter" style="width: 759px"><a href="http://zlika.org/wp-content/uploads/2011/03/02.png" rel="lightbox[704]"><img src="http://zlika.org/wp-content/uploads/2011/03/02.png" alt="" title="The result" width="749" height="75" class="size-full wp-image-732" /></a><p class="wp-caption-text">The result</p></div>
<p><strong><span style="text-decoration: underline;">Create PHP form to insert a UTF-8 data</span></strong></p>
<p><strong>1. Create table</strong></p>
<pre class="brush: sql;">
USE zlika;

CREATE TABLE CharsetTest
(
	[Language] VARCHAR(50)
	, [Phrase] UTF8String
);
</pre>
<p><strong>2. Create PHP form (insert.php)</strong></p>
<pre class="brush: php;">
&lt;html&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
	&lt;title&gt;Charset Test&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;?php
// Connect to SQL Server
$server = 'ZLIKA';
$username = 'zlika';
$password = 'myPassword';
$connect = mssql_connect($server, $username, $password) or die ('No server connection!');
$sqldb = mssql_select_db('zlika', $connect) or die ('No database connection!');

// Get the variables
$language = $_POST['language'];
$phrase = $_POST['phrase'];

// Insert records in the database
$query = &quot;INSERT INTO CharsetTest (Language, Phrase) SELECT '&quot; . $language . &quot;', '&quot; . $phrase . &quot;'&quot;;
$result = mssql_query($query);

// Close database connection
mssql_close($connect);
?&gt;

&lt;form action=&quot;insert.php&quot; method=&quot;post&quot;&gt;
	Language: &lt;input name=&quot;language&quot; /&gt;&lt;br /&gt;
	Phrase: &lt;input name=&quot;phrase&quot; /&gt;&lt;br /&gt;
	&lt;input type=&quot;Submit&quot; /&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>3. Insert test data</strong></p>
<blockquote><p>Bulgarian &#8211;&gt; Честита Нова Година!<br />
Arabic &#8211;&gt; سنة جديدة سعيدة!<br />
Armenian &#8212; &gt; Շնորհավոր Նոր Տարի<br />
Azarbaijani &#8211;&gt; Yeni iliniz mübarək<br />
Catalan &#8211;&gt; Feliç Any Nou!<br />
Chinese (Traditional) &#8211;&gt; 新年快樂<br />
Polish &#8211;&gt; Szczęśliwego Nowego Roku!<br />
Thai &#8211;&gt; สวัสดีปีใหม่<br />
hindi &#8211;&gt; नया साल मुबारक हो</p></blockquote>
<p><strong>4. Check the content of the table (check.php)</strong></p>
<pre class="brush: php;">
&lt;html&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
	&lt;title&gt;Charset Test&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;?php

// Connect to SQL Server
$server = 'ZLIKA';
$username = 'zlika';
$password = 'myPassword';
$connect = mssql_connect($server, $username, $password) or die ('No server connection!');
$sqldb = mssql_select_db('zlika', $connect) or die ('No database connection!');

// Select the data
$query = 'SELECT Language, Phrase.ToString() AS Phrase FROM CharsetTest';
$result = mssql_query($query);

//Retrieving data Header
echo '&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;100%&quot;&gt;&lt;tr&gt;';

$i = 0;
while ($i &lt; mssql_num_fields($result))
{
	echo '&lt;th&gt;'. mssql_field_name($result, $i) . '&lt;/th&gt;';
	$i++;
}
echo '&lt;/tr&gt;';

//Retrieving rows
while ($row = mssql_fetch_array($result, MSSQL_ASSOC))
{
	echo '&lt;tr&gt;';
	foreach ($row as $data)
	{
		echo '&lt;td&gt;' . $data . '&lt;/td&gt;';
	}
	echo'&lt;/tr&gt;';
}

echo '&lt;/table&gt;';

// Close database connection
mssql_close($connect);

?&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The result:</p>
<div id="attachment_723" class="wp-caption aligncenter" style="width: 353px"><a href="http://zlika.org/wp-content/uploads/2011/03/01.png" rel="lightbox[704]"><img class="size-full wp-image-723" title="The result" src="http://zlika.org/wp-content/uploads/2011/03/01.png" alt="" width="343" height="248" /></a><p class="wp-caption-text">The result</p></div>
<p>Félicitations</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="How to store UTF-8 data in SQL Server" href="http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/"><b>How to store UTF-8 data in SQL Server</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/it/" title="View all posts in IT" rel="category tag">IT</a>, <a href="http://zlika.org/index.php/category/it/ms-sql-server/" title="View all posts in MS SQL Server" rel="category tag">MS SQL Server</a>, <a href="http://zlika.org/index.php/category/it/php/" title="View all posts in PHP" rel="category tag">PHP</a>, <a href="http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/&title=How to store UTF-8 data in SQL Server">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/&t=How to store UTF-8 data in SQL Server">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/&title=How to store UTF-8 data in SQL Server">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/&title=How to store UTF-8 data in SQL Server">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/&title=How to store UTF-8 data in SQL Server">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2011, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2011/03/06/how-to-store-utf-8-data-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MaraK</title>
		<link>http://zlika.org/index.php/2011/02/17/marak/</link>
		<comments>http://zlika.org/index.php/2011/02/17/marak/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 16:41:01 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=712</guid>
		<description><![CDATA[I&#8217;m starting a project for management of a small store, using C# and SQL Server Express.
Félicitations


MaraK 
Author: zlika (Peter Lalovsky), Category: C#, IT, MS SQL Server, %%comment_text%%



Add to:
Delicious &#124; 
Facebook &#124; 
Twitter &#124; Live &#124; 
Reddit &#124; 
Technorati &#124; 
Digg



Followers: Technorati &#124; Google



© 2011, zlika&#039;s (RSS)

Feed enhanced by Better Feed from  Ozh
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting a project for management of a small store, using C# and SQL Server Express.</p>
<p>Félicitations</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="MaraK" href="http://zlika.org/index.php/2011/02/17/marak/"><b>MaraK</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/it/csharp/" title="View all posts in C#" rel="category tag">C#</a>, <a href="http://zlika.org/index.php/category/it/" title="View all posts in IT" rel="category tag">IT</a>, <a href="http://zlika.org/index.php/category/it/ms-sql-server/" title="View all posts in MS SQL Server" rel="category tag">MS SQL Server</a>, <a href="http://zlika.org/index.php/2011/02/17/marak/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2011/02/17/marak/&title=MaraK">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2011/02/17/marak/&t=MaraK">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2011/02/17/marak/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2011/02/17/marak/&title=MaraK">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2011/02/17/marak/&title=MaraK">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2011/02/17/marak/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2011/02/17/marak/&title=MaraK">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2011/02/17/marak/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2011/02/17/marak/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2011, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2011/02/17/marak/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Boka!</title>
		<link>http://zlika.org/index.php/2011/02/02/boka/</link>
		<comments>http://zlika.org/index.php/2011/02/02/boka/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 05:48:12 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=709</guid>
		<description><![CDATA[
\m/
//
Félicitations


Boka! 
Author: zlika (Peter Lalovsky), Category: Music, Personal, %%comment_text%%



Add to:
Delicious &#124; 
Facebook &#124; 
Twitter &#124; Live &#124; 
Reddit &#124; 
Technorati &#124; 
Digg



Followers: Technorati &#124; Google



© 2011, zlika&#039;s (RSS)

Feed enhanced by Better Feed from  Ozh
]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/e/v2I0b-kf0vw"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/v2I0b-kf0vw" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>\m/<br />
//</p>
<p>Félicitations</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="Boka!" href="http://zlika.org/index.php/2011/02/02/boka/"><b>Boka!</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/music/" title="View all posts in Music" rel="category tag">Music</a>, <a href="http://zlika.org/index.php/category/personal/" title="View all posts in Personal" rel="category tag">Personal</a>, <a href="http://zlika.org/index.php/2011/02/02/boka/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2011/02/02/boka/&title=Boka!">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2011/02/02/boka/&t=Boka!">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2011/02/02/boka/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2011/02/02/boka/&title=Boka!">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2011/02/02/boka/&title=Boka!">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2011/02/02/boka/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2011/02/02/boka/&title=Boka!">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2011/02/02/boka/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2011/02/02/boka/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2011, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2011/02/02/boka/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fender Bass and Amplifier</title>
		<link>http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/</link>
		<comments>http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 00:17:53 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Fender]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=677</guid>
		<description><![CDATA[Last Friday I drank two beers with a bunch of smiled people and one of them asked me if I have bought my bass. I answered no. He said that live is so simple and if I die tomorrow, I&#8217;ll regret for every day I have not played. He&#8217;s right. Yesterday and today I visited two music [...]]]></description>
			<content:encoded><![CDATA[<p>Last Friday I drank two beers with a bunch of smiled people and one of them asked me if I have bought my bass. I answered no. He said that live is so simple and if I die tomorrow, I&#8217;ll regret for every day I have not played. He&#8217;s right. Yesterday and today I visited two music stored to find my bass. Now I have to wait for the price and order my <a title="Fender Precision American Deluxe" href="http://www.fender.com/products/search.php?partno=0194070775" target="_blank">Fender Precision American Deluxe</a> bass and the amplifier (<a title="Fender Rumble 350 Combo" href="http://www.fender.com/products/search.php?partno=2315700020" target="_blank">Fender Rumble 350 Combo</a>). What else? A <a title="1' CABLE - VIOLET" href="http://www.fender.com/products/search.php?partno=0990401026" target="_blank">cable</a>, a<a title="Running Logo Strap" href="http://www.fender.com/products/search.php?partno=0990671000" target="_blank"> strap</a> and a <a title="Fender® Deluxe Gig Bags" href="http://www.fender.com/products/search.php?partno=0991535006" target="_blank">bag</a>.</p>
<p>Félicitations</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="Fender Bass and Amplifier" href="http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/"><b>Fender Bass and Amplifier</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/music/" title="View all posts in Music" rel="category tag">Music</a>, <a href="http://zlika.org/index.php/category/personal/" title="View all posts in Personal" rel="category tag">Personal</a>, <a href="http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/&title=Fender Bass and Amplifier">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/&t=Fender Bass and Amplifier">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/&title=Fender Bass and Amplifier">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/&title=Fender Bass and Amplifier">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/&title=Fender Bass and Amplifier">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2010, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2010/11/21/fender-bass-and-amplifier/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Equal Action to Identical Databases</title>
		<link>http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/</link>
		<comments>http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 05:42:58 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Transact-SQL]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SSMS]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=636</guid>
		<description><![CDATA[If I administer 345 identical databases I can do equal action to all of them (or some of them) easy by selecting the names of the databases, generate dynamic code, execute it and select the result and the errors (is any).

In this example I will select the names of the databases, create dynamic code and [...]]]></description>
			<content:encoded><![CDATA[<p>If I administer 345 identical databases I can do equal action to all of them (or some of them) easy by selecting the names of the databases, generate dynamic code, execute it and select the result and the errors (is any).</p>
<p><span id="more-636"></span><br />
In this example I will select the names of the databases, create dynamic code and execute it. Next, in case of result or errors &#8211; create temporary &#8216;Result&#8217; or/and &#8216;Errors&#8217; table/s. The database zlika1 differs (column name &#8216;FirstName1&#8242; on line 16) from the others to generate an error. </p>
<pre class="brush: sql; highlight: [16];">
-- Create databases
CREATE DATABASE zlika1
CREATE DATABASE zlika2
CREATE DATABASE zlika3
GO

-- Create Tables
CREATE TABLE zlika1.dbo.Names
(
	FirstName NVARCHAR(50)
	, LastName NVARCHAR(50)
)

CREATE TABLE zlika2.dbo.Names
(
	FirstName1 NVARCHAR(50)
	, LastName NVARCHAR(50)
)

CREATE TABLE zlika3.dbo.Names
(
	FirstName NVARCHAR(50)
	, LastName NVARCHAR(50)
)

-- Populate Tables
INSERT INTO zlika1.dbo.Names VALUES ('z_FirstName', 'z_Lastname')
INSERT INTO zlika2.dbo.Names VALUES ('z1_FirstName', 'z1_Lastname')
INSERT INTO zlika3.dbo.Names VALUES ('z2_FirstName', 'z2_Lastname')
GO
</pre>
<p>And the script&#8230; The code that will be executes to all databases is on line 42. in this example I select the first and last names of the &#8216;Names&#8217; table from all databases which name starts with &#8216;zlika&#8217;.</p>
<pre class="brush: sql; highlight: [42];">
USE master
GO

-- Declare variables
DECLARE @DBName NVARCHAR(100), @Rows INT, @SQL VARCHAR(max)

-- Delete Temp Table
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#TempTable%')
	DROP TABLE #TempTable

IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#Result%')
	DROP TABLE #Result

IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#Errors%')
	DROP TABLE #Errors

-- Populate Temp Table
SELECT [name]
INTO #TempTable
FROM sys.databases
WHERE [name] LIKE 'zlika%'

-- Count rows in Temp Table
SELECT @Rows = COUNT([name])
FROM #TempTable

-- Cycle
WHILE (@Rows) &gt; 0
BEGIN
	SELECT TOP 1 @DBName = [name] FROM #TempTable
	---------- Do Something Start ----------
	BEGIN TRY
		IF NOT EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#Result%')
			BEGIN
				CREATE TABLE #Result
				(
					DatabaseName NVARCHAR(50)
					, FirstName NVARCHAR(50)
					, LastName NVARCHAR(50)
				)
			END
		SELECT @SQL = 'INSERT INTO #Result SELECT ''' + @DBName + ''', FirstName, LastName FROM ' + @DBName + '.dbo.Names'
		EXEC (@SQL)
	END TRY

	BEGIN CATCH
		IF NOT EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#Errors%')
			BEGIN
				CREATE TABLE #Errors
				(
					DatabaseName NVARCHAR(100)
					, ErrorNumber INT
					, ErrorMessage NVARCHAR(250)
				)
			END
		INSERT INTO #Errors VALUES (@DBName, ERROR_NUMBER(), ERROR_MESSAGE())
	END CATCH
	---------- Do Something End ----------
	DELETE FROM #TempTable WHERE [name] = @DBName
	SET @Rows = @Rows - 1
END

IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#Result%')
	SELECT *
	FROM #Result

IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#Errors%')
	SELECT *
	FROM #Errors

-- Clean up
DROP TABLE #TempTable

IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#Result%')
	DROP TABLE #Result

IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE [name] LIKE '#Errors%')
	DROP TABLE #Errors
GO
</pre>
<p>The result &#8211; two rows, corresponding to &#8216;zlika1&#8242; and &#8216;zlika3&#8242; databases and one error, corresponding to &#8216;zlika2&#8242; database.<br />
<div id="attachment_671" class="wp-caption aligncenter" style="width: 472px"><a href="http://zlika.org/wp-content/uploads/2010/11/01.png" rel="lightbox[636]"><img src="http://zlika.org/wp-content/uploads/2010/11/01.png" alt="" title="Result - two selected rows and one error" width="462" height="194" class="size-full wp-image-671" /></a><p class="wp-caption-text">Result - two selected rows and one error</p></div></p>
<p>Félicitations</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="Equal Action to Identical Databases" href="http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/"><b>Equal Action to Identical Databases</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/it/" title="View all posts in IT" rel="category tag">IT</a>, <a href="http://zlika.org/index.php/category/it/sql/" title="View all posts in Transact-SQL" rel="category tag">Transact-SQL</a>, <a href="http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/&title=Equal Action to Identical Databases">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/&t=Equal Action to Identical Databases">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/&title=Equal Action to Identical Databases">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/&title=Equal Action to Identical Databases">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/&title=Equal Action to Identical Databases">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2010, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2010/11/15/equal-action-to-identical-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8216;My favorite drummers&#8217; list</title>
		<link>http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/</link>
		<comments>http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 20:34:39 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Drums]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=639</guid>
		<description><![CDATA[To play drums (or whatever else) is not only to hit the sticks, pull the strings or push the buttons fast and technically. A joke says that a father took his son to an old piano teacher to have his opinion. The kid played very fast and technically well. He even used his nose to [...]]]></description>
			<content:encoded><![CDATA[<p>To play drums (or whatever else) is not only to hit the sticks, pull the strings or push the buttons fast and technically. A joke says that a father took his son to an old piano teacher to have his opinion. The kid played very fast and technically well. He even used his nose to push a button in an &#8220;impossible to play situation&#8221;. The final words of the teacher were:</p>
<blockquote><p>Boy, you play very well. Soon you&#8217;ll start to create a real music!</p></blockquote>
<p>In this line of thought, I present you a short list (will be updated) of my favorite drummers. Drummers, who are not only drummers, but also magicians.</p>
<p><span id="more-639"></span></p>
<hr size="1" noshade="noshade" />
<p>1. <a title="Tim Alexander (YouTube)" href="http://www.youtube.com/results?search_query=Tim+Alexander" target="_blank">Tim Alexander</a> (<a title="Primus (YouTube)" href="http://www.youtube.com/results?search_query=Primus" target="_blank">Primus</a>, <a title="Attention Deficit (YouTube)" href="http://www.youtube.com/results?search_query=Attention+deficit+%2BTim+Alexander" target="_blank">Attention Deficit</a>)</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/e/_yrfsu5WYwQ"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/_yrfsu5WYwQ" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a title="Tim Alexander (WikipediA)" href="http://en.wikipedia.org/wiki/Tim_Alexander" target="_blank">Tim Alexander</a> (Wiki)</p>
<hr size="1" noshade="noshade" />
<p>2. <a title="Dave Lombardo (YouTube)" href="http://www.youtube.com/results?search_query=Dave+Lombardo" target="_blank">Dave Lombardo</a> (<a title="Slayer (YouTube)" href="http://www.youtube.com/results?search_query=Slayer" target="_blank">Slayer</a>, <a title="Fantomas (YouTube)" href="http://www.youtube.com/results?search_query=Fantomas" target="_blank">Fantomas</a>)</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/e/xTRj4YGxeto"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/xTRj4YGxeto" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a title="Dave Lombardo (WikipediA)" href="http://en.wikipedia.org/wiki/Dave_Lombardo" target="_blank">Dave Lombardo</a> (Wiki)</p>
<hr size="1" noshade="noshade" />
<p>3. <a title="Mike Portnoy (YouTube)" href="http://www.youtube.com/results?search_query=Mike+Portnoy" target="_blank">Mike Portnoy</a> (<a title="Dream Theater (YouTube)" href="http://www.youtube.com/results?search_query=Dream+Theater" target="_blank">Dream Theater</a>, <a title="Licuid Tension Experiment (YouTube)" href="http://www.youtube.com/results?search_query=Licuid+Tension+Experiment" target="_blank">Licuid Tension Experiment</a>)</p>
<p><object width="500" height="306"><param name="movie" value="http://www.youtube.com/e/WxuYIiGqXWk"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/WxuYIiGqXWk" type="application/x-shockwave-flash" width="500" height="306" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a title="Mike Portnoy (WikipediA)" href="http://en.wikipedia.org/wiki/Mike_Portnoy" target="_blank">Mike Portnoy</a> (Wiki)</p>
<hr size="1" noshade="noshade" />
<p>4. <a title="Ringo Star (YouTube)" href="http://www.youtube.com/results?search_query=Ringo+Star" target="_blank">Ringo Star</a> (<a title="Beatles (YouTube)" href="http://www.youtube.com/results?search_query=Beatles" target="_blank">Beatles</a>)</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/e/U1Zr8ohkv18"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/U1Zr8ohkv18" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a title="Ringo Star (WikipediA)" href="http://en.wikipedia.org/wiki/Ringo_Star" target="_blank">Ringo Star</a> (Wiki)</p>
<hr size="1" noshade="noshade" />
<p>5. <a title="Lars Ulrich (YouTube)" href="http://www.youtube.com/results?search_query=Lars+Ulrich" target="_blank">Lars Ulrich</a> (<a title="Metallica (YouTube)" href="http://www.youtube.com/results?search_query=Metallica" target="_blank">Metallica</a>)</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/e/cUsR47vXjHs"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/cUsR47vXjHs" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a title="Lars Ulrich (WikipediA)" href="http://en.wikipedia.org/wiki/Lars_Ulrich" target="_blank">Lars Ulrich</a> (Wiki)</p>
<hr size="1" noshade="noshade" />
<p>6. <a title="Stephen Perkins" href="http://www.youtube.com/results?search_query=stephen++perkins" target="_blank">Stephen Perkins</a> (<a title="Jane's Addiction" href="http://www.youtube.com/results?search_query=Jane's+Addiction" target="_blank">Jane&#8217;s Addiction</a>, <a title="Porno For Pyros" href="http://www.youtube.com/results?search_query=Porno+For+Pyros" target="_blank">Porno For Pyros</a>)</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/e/B02Q5qqereI"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/B02Q5qqereI" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a title="Steven Perkins" href="http://en.wikipedia.org/wiki/Stephen_Perkins" target="_blank">Stephen Perkins</a> (Wiki)</p>
<hr size="1" noshade="noshade" />
<p>7. <a title="Chad Smith" href="http://www.youtube.com/results?search_query=Chad+Smith" target="_blank">Chad Smith</a> (<a title="Red Hot Chili Peppers" href="http://www.youtube.com/results?search_query=Red+Hot+Chili+Peppers" target="_blank">Red Hot Chili Peppers</a>)</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/e/LuibdktNlWQ"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/LuibdktNlWQ" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a title="Chad Smith" href="http://en.wikipedia.org/wiki/Chad_Smith" target="_blank">Chad Smith (Wiki)</a></p>
<p>Félicitations</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="&#8216;My favorite drummers&#8217; list" href="http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/"><b>&#8216;My favorite drummers&#8217; list</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/music/" title="View all posts in Music" rel="category tag">Music</a>, <a href="http://zlika.org/index.php/category/personal/" title="View all posts in Personal" rel="category tag">Personal</a>, <a href="http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/&title=&#8216;My favorite drummers&#8217; list">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/&t=&#8216;My favorite drummers&#8217; list">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/&title=&#8216;My favorite drummers&#8217; list">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/&title=&#8216;My favorite drummers&#8217; list">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/&title=&#8216;My favorite drummers&#8217; list">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2010, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2010/11/07/my-favorite-drummers-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELECT * or SELECT [Column Name] in IF statement in MS SQL Server</title>
		<link>http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/</link>
		<comments>http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 19:02:32 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[Transact-SQL]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=554</guid>
		<description><![CDATA[When we decide how to manipulate the data, we use IF statement verification. For example if we export information about merchant sales, we have two common groups of merchants &#8211; these we scan (with serial numbers) and these we don&#8217;t scan. For both of them we use two BEGIN&#8230; END blocks. To verify the type [...]]]></description>
			<content:encoded><![CDATA[<p>When we decide how to manipulate the data, we use IF statement verification. For example if we export information about merchant sales, we have two common groups of merchants &#8211; these we scan (with serial numbers) and these we don&#8217;t scan. For both of them we use two BEGIN&#8230; END blocks. To verify the type we use IF statement which searches for a row in &#8216;RegisteredScans&#8217; table.</p>
<p><span id="more-554"></span> We can write the IF statement like:</p>
<pre class="brush: sql; highlight: [4];">
...
IF EXISTS
(
	SELECT *
	FROM RegisteredScans
	WHERE...
)
BEGIN
	...
END
...
</pre>
<p>or:</p>
<pre class="brush: sql; highlight: [4];">
...
IF EXISTS
(
	SELECT [Column Name]
	FROM RegisteredScans
	WHERE [Column Name]...
)
BEGIN
	...
END
...
</pre>
<p>The difference is that we select ALL or only the column that we use to verify the truth of the IF statement.</p>
<p>I created an example to demonstrate the difference between SELECT * and SELECT [Column Name]. First I need to know which table has most rows in AdventureWorks2008 database. On <a title="List tables and count rows" href="http://sqlserver2000.databases.aspfaq.com/how-do-i-get-a-list-of-sql-server-tables-and-their-row-counts.html" target="_blank">this address</a> I found the following script:</p>
<pre class="brush: sql;">
USE AdventureWorks2008
GO

ALTER PROCEDURE dbo.listTableRowCounts
AS
BEGIN
	SET NOCOUNT ON

	DECLARE @SQL VARCHAR(255)
	SET @SQL = 'DBCC UPDATEUSAGE (' + DB_NAME() + ')'
	EXEC(@SQL)

	CREATE TABLE #foo
	(
		tablename VARCHAR(255)
        , rc INT
	)

	INSERT #foo
	EXEC sp_msForEachTable
		'SELECT PARSENAME(''?'', 1),
		COUNT(*) FROM ?'
END

	SELECT tablename, rc
	FROM #foo
	ORDER BY rc DESC

	DROP TABLE #foo
GO
</pre>
<p>Then I executed the stored procedure</p>
<pre class="brush: sql;">
USE AdventureWorks2008
GO

EXEC dbo.listTableRowCounts
GO
</pre>
<p>And I found that the table &#8216;SalesOrderDetail&#8217; contains 121317 rows (most in the database). Next I wrote a script which uses Start time and End time to calculate the duration of execution of a code. In our example the code is:</p>
<pre class="brush: sql; highlight: [1];">
SELECT *
FROM SalesOrderDetail
GO
</pre>
<p>and</p>
<pre class="brush: sql; highlight: [1];">
SELECT SalesOrderID
FROM SalesOrderDetail
GO
</pre>
<p>When I select all the columns, the time for the operation is 6.594 seconds</p>
<pre class="brush: sql; highlight: [12];">
USE AdventureWorks2008
GO

-- Declare variables
DECLARE @Start TIME
DECLARE @End TIME

-- Set start time
SET @Start = GETDATE()

-- Operation
SELECT *
FROM Sales.SalesOrderDetail

-- Set end time
SET @End = GETDATE()

-- Calculate the difference in times
SELECT DATEDIFF(MS, @Start, @End) AS Milliseconds
GO
</pre>
<div id="attachment_558" class="wp-caption aligncenter" style="width: 517px"><a href="http://zlika.org/wp-content/uploads/2010/10/01.png" rel="lightbox[554]"><img class="size-full wp-image-558" title="SELECT * FROM..." src="http://zlika.org/wp-content/uploads/2010/10/01.png" alt="" width="507" height="164" /></a><p class="wp-caption-text">SELECT * FROM...</p></div>
<p>When I select the &#8216;SalesOrderID&#8217; column, the time for the operation is 2.470 seconds</p>
<div id="attachment_559" class="wp-caption aligncenter" style="width: 160px"><a href="http://zlika.org/wp-content/uploads/2010/10/02.png" rel="lightbox[554]"><img class="size-full wp-image-559" title="SELECT SalesOrderID FROM..." src="http://zlika.org/wp-content/uploads/2010/10/02.png" alt="" width="150" height="289" /></a><p class="wp-caption-text">SELECT SalesOrderID FROM...</p></div>
<p>When I select &#8216;rowguid&#8217; column, the time for the operation is 3.234 seconds</p>
<div id="attachment_560" class="wp-caption aligncenter" style="width: 344px"><a href="http://zlika.org/wp-content/uploads/2010/10/03.png" rel="lightbox[554]"><img class="size-full wp-image-560" title="SELECT rowguid FROM..." src="http://zlika.org/wp-content/uploads/2010/10/03.png" alt="" width="334" height="199" /></a><p class="wp-caption-text">SELECT rowguid FROM...</p></div>
<p>The difference between &#8216;SalesOrderID&#8217; and &#8216;rowguid&#8217; columns is that &#8216;SalesOrderID&#8217; is Primary Key, i.e. it&#8217;s indexed.</p>
<p>Félicitations</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="SELECT * or SELECT [Column Name] in IF statement in MS SQL Server" href="http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/"><b>SELECT * or SELECT [Column Name] in IF statement in MS SQL Server</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/it/" title="View all posts in IT" rel="category tag">IT</a>, <a href="http://zlika.org/index.php/category/it/ms-sql-server/" title="View all posts in MS SQL Server" rel="category tag">MS SQL Server</a>, <a href="http://zlika.org/index.php/category/it/sql/" title="View all posts in Transact-SQL" rel="category tag">Transact-SQL</a>, <a href="http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/&title=SELECT * or SELECT [Column Name] in IF statement in MS SQL Server">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/&t=SELECT * or SELECT [Column Name] in IF statement in MS SQL Server">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/&title=SELECT * or SELECT [Column Name] in IF statement in MS SQL Server">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/&title=SELECT * or SELECT [Column Name] in IF statement in MS SQL Server">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/&title=SELECT * or SELECT [Column Name] in IF statement in MS SQL Server">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2010, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2010/10/31/select-or-select-column-name-in-if-statement-in-ms-sql-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Select server logins and their roles in SQL Server</title>
		<link>http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/</link>
		<comments>http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 21:25:37 +0000</pubDate>
		<dc:creator>zlika</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[SSMS]]></category>
		<category><![CDATA[Transact-SQL]]></category>

		<guid isPermaLink="false">http://zlika.org/?p=540</guid>
		<description><![CDATA[To view all the server logins and their roles I use the system view sys.syslogins and CASE to convert 1 to &#8220;Yes&#8221; and 0 to &#8220;No&#8221;.


-- Select all database logins and their server roles
USE master
GO

SELECT
	[name] AS [Login]
	, CASE sysadmin WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE 'N/A' END AS [sysadmin]
	, CASE securityadmin WHEN [...]]]></description>
			<content:encoded><![CDATA[<p>To view all the server logins and their roles I use the system view <a title="sys.syslogins" href="http://msdn.microsoft.com/en-us/library/ms178593.aspx" target="_blank">sys.syslogins</a> and <a title="CASE" href="http://msdn.microsoft.com/en-us/library/ms181765.aspx" target="_blank">CASE</a> to convert 1 to &#8220;Yes&#8221; and 0 to &#8220;No&#8221;.</p>
<p><span id="more-540"></span></p>
<pre class="brush: sql;">
-- Select all database logins and their server roles
USE master
GO

SELECT
	[name] AS [Login]
	, CASE sysadmin WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE 'N/A' END AS [sysadmin]
	, CASE securityadmin WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE 'N/A' END AS [securityadmin]
	, CASE serveradmin WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE 'N/A' END AS [serveradmin]
	, CASE setupadmin WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE 'N/A' END AS [setupadmin]
	, CASE processadmin WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE 'N/A' END AS [processadmin]
	, CASE diskadmin WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE 'N/A' END AS [diskadmin]
	, CASE dbcreator WHEN 0 THEN 'No' WHEN 1 THEN 'Yes' ELSE 'N/A' END AS [dbcreator]

FROM sys.syslogins
GO
</pre>
<p>Félicitations</p>
<hr size="1" noshade>
<p style="font-family = verdana, tahoma, arial, sans-serif; font-size: 10px;">
<a title="Select server logins and their roles in SQL Server" href="http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/"><b>Select server logins and their roles in SQL Server</b></a> <br />
Author: zlika (Peter Lalovsky), Category: <a href="http://zlika.org/index.php/category/it/" title="View all posts in IT" rel="category tag">IT</a>, <a href="http://zlika.org/index.php/category/it/ms-sql-server/" title="View all posts in MS SQL Server" rel="category tag">MS SQL Server</a>, <a href="http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/#comments">%%comment_text%%</a>

<br />

Add to:
<a title="Share on Delicious" href="http://del.icio.us/post?url=http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/&title=Select server logins and their roles in SQL Server">Delicious</a> | 
<a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/&t=Select server logins and their roles in SQL Server">Facebook</a> | 
<a title="Share on Twitter" href="http://twitter.com/home?status=Currently reading http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/">Twitter</a> | <a title="Share on Live" href="http://favorites.live.com/quickadd.aspx?url=http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/&title=Select server logins and their roles in SQL Server">Live</a> | 
<a title="Share on Reddit" href="http://reddit.com/submit?url=http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/&title=Select server logins and their roles in SQL Server">Reddit</a> | 
<a title="Share on Technorati" href="http://www.technorati.com/faves?add=http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/">Technorati</a> | 
<a title="Share on Digg" href="http://digg.com/submit?url=http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/&title=Select server logins and their roles in SQL Server">Digg</a>

<br />

Followers: <a href="http://www.technorati.com/search/http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/" title="Linking blogs to this article, on Technorati">Technorati</a> | <a href="http://www.google.com/blogsearch?hl=en&q=http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/" title="Linking blogs to this article, on Google">Google</a>

<br />

© 2010, <a href="http://zlika.org">zlika&#039;s</a> (<a href="http://zlika.org/index.php/feed/">RSS</a>)
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://zlika.org/index.php/2010/10/24/select-server-logins-and-their-roles-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

