<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Tharaka&#039;s Blog</title>
	<atom:link href="http://tharakaweb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tharakaweb.com</link>
	<description>Design, Development, and Resources</description>
	<lastBuildDate>Tue, 28 May 2013 04:46:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tharakaweb.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/bf07d08db76ca661aa75311af885e4e1?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Tharaka&#039;s Blog</title>
		<link>http://tharakaweb.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tharakaweb.com/osd.xml" title="Tharaka&#039;s Blog" />
	<atom:link rel='hub' href='http://tharakaweb.com/?pushpress=hub'/>
		<item>
		<title>Generate insert statements from the specific table data using SQL Server</title>
		<link>http://tharakaweb.com/2013/05/25/generate-insert-statements-from-the-specific-table-data-using-sql-server/</link>
		<comments>http://tharakaweb.com/2013/05/25/generate-insert-statements-from-the-specific-table-data-using-sql-server/#comments</comments>
		<pubDate>Sat, 25 May 2013 06:25:20 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[database problems]]></category>
		<category><![CDATA[database publishing]]></category>
		<category><![CDATA[microsoft sql server]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[SQL 2005]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[SQL 2012]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[sql server data]]></category>
		<category><![CDATA[sql server tools]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=329</guid>
		<description><![CDATA[When you are deploying your application, sometimes you may want to generate SQL script with the insert statement of the specific database table. In this article I will show you two easiest ways to do this with SQL Server and SQL Server tools. 1. Using Database Publishing Wizard (“SqlPubWiz.exe”) If you install Visual studio 2008 [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=329&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>When you are deploying your application, sometimes you may want to generate SQL script with the insert statement of the specific database table. In this article I will show you two easiest ways to do this with SQL Server and SQL Server tools.</p>
<p>1. Using Database Publishing Wizard (“SqlPubWiz.exe”)</p>
<p>If you install Visual studio 2008 / Visual Studio 2008 Express full version, it will automatically install the Microsoft SQL Server Data Publishing Wizard on the following location.<br />
<strong><em>[SQL Server Installation Location]\90\Tools\Publishing\[version]\ SqlPubWiz.exe</em></strong></p>
<p>If it is not there you can download it from the following URL<br />
<a href="http://go.microsoft.com/fwlink/?LinkId=119368">http://go.microsoft.com/fwlink/?LinkId=119368</a></p>
<div class="wp-caption alignnone" style="width: 370px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image002.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQLPubWiz location" alt="SQLPubWiz location" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image002_thumb.jpg?w=360&#038;h=365" width="360" height="365" border="0" /></a><p class="wp-caption-text">SQLPubWiz location</p></div>
<p>When you run the “SqlPubWiz.exe”, it will open the database publishing wizard</p>
<div class="wp-caption alignnone" style="width: 375px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image004.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard" alt="Database Publishing Wizard" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image004_thumb.jpg?w=365&#038;h=333" width="365" height="333" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard</p></div>
<p>Click next and enter the database server connection information accordingly.</p>
<div class="wp-caption alignnone" style="width: 378px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image006.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard - Database Server Connection" alt="Database Publishing Wizard - Database Server Connection" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image006_thumb.jpg?w=368&#038;h=332" width="368" height="332" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard &#8211; Database Server Connection</p></div>
<p>Click next, and it will ask you to select the database, which you want to generate the data from</p>
<div class="wp-caption alignnone" style="width: 379px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image008.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard - Select Database" alt="Database Publishing Wizard - Select Database" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image008_thumb.jpg?w=369&#038;h=332" width="369" height="332" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard &#8211; Select Database</p></div>
<p>Next screen will ask to select the Object type. You can use this database publishing wizard to generate data and schema both. In here I consider only for the data generation part. Now choose “Tables” as an option and click next. (Make sure to uncheck “Script all objects in the selected database”)</p>
<div class="wp-caption alignnone" style="width: 379px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image010.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard - Choose Object Type" alt="Database Publishing Wizard - Choose Object Type" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image010_thumb.jpg?w=369&#038;h=335" width="369" height="335" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard &#8211; Choose Object Type</p></div>
<p>Then, the next ask to select the table which you want to generate the data from. Select whatever the table you want and click next.</p>
<div class="wp-caption alignnone" style="width: 388px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image012.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard - Choose Tables" alt="Database Publishing Wizard - Choose Tables" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image012_thumb.jpg?w=378&#038;h=341" width="378" height="341" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard &#8211; Choose Tables</p></div>
<p>Next step ask to specify the output location. You can enter the file name and the location there.</p>
<div class="wp-caption alignnone" style="width: 395px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image014.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard - Select an Output Location" alt="Database Publishing Wizard - Select an Output Location" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image014_thumb.jpg?w=385&#038;h=350" width="385" height="350" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard &#8211; Select an Output Location</p></div>
<p>By clicking Next, It shows to select the publishing options. There are three publishing types, <b>Schema only</b>, <b>Data only</b>, or <b>Schema and data. </b>Here you have to select<b> “Data only”.</b></p>
<div class="wp-caption alignnone" style="width: 395px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image016.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard - Select Publishing Option" alt="Database Publishing Wizard - Select Publishing Option" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image016_thumb.jpg?w=385&#038;h=348" width="385" height="348" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard &#8211; Select Publishing Option</p></div>
<p>Click next and it will generate the insert data script for you.</p>
<div class="wp-caption alignnone" style="width: 396px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image018.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard - Publishing Progress" alt="Database Publishing Wizard - Publishing Progress" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image018_thumb.jpg?w=386&#038;h=349" width="386" height="349" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard &#8211; Publishing Progress</p></div>
<div class="wp-caption alignnone" style="width: 401px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image019.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Database Publishing Wizard - Generated Script" alt="Database Publishing Wizard - Generated Script" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image019_thumb.png?w=391&#038;h=136" width="391" height="136" border="0" /></a><p class="wp-caption-text">Database Publishing Wizard &#8211; Generated Script</p></div>
<p>2. Using SQL Server <i>Generate Script</i> wizard</p>
<div class="wp-caption alignnone" style="width: 401px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image021.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script" alt="SQL Server Generate Script" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image021_thumb.jpg?w=391&#038;h=415" width="391" height="415" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script</p></div>
<p>When you select “Generate Script” menu item, it will open the Generate SQL Server Scripts Wizard dialog.</p>
<div class="wp-caption alignnone" style="width: 397px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image023.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script - Wizard Dialog" alt="SQL Server Generate Script - Wizard Dialog" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image023_thumb.jpg?w=387&#038;h=350" width="387" height="350" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script &#8211; Wizard Dialog</p></div>
<p>By clicking next, it asks to select the database which you want to generate the script.</p>
<div class="wp-caption alignnone" style="width: 398px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image025.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script Wizard - Select Database" alt="SQL Server Generate Script Wizard - Select Database" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image025_thumb.jpg?w=388&#038;h=351" width="388" height="351" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script Wizard &#8211; Select Database</p></div>
<p>By clicking Next, It shows to select the script options dialog box. In here, you change the “Script Data” as “True” and click the next button</p>
<div class="wp-caption alignnone" style="width: 402px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image027.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script Wizard - Choose Script Option" alt="SQL Server Generate Script Wizard - Choose Script Option" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image027_thumb.jpg?w=392&#038;h=355" width="392" height="355" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script Wizard &#8211; Choose Script Option</p></div>
<p>Next screen will ask to select the Object type. Now choose “Tables” as an option and click next.</p>
<div class="wp-caption alignnone" style="width: 407px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image029.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script Wizard - Choose Object Type" alt="SQL Server Generate Script Wizard - Choose Object Type" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image029_thumb.jpg?w=397&#038;h=359" width="397" height="359" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script Wizard &#8211; Choose Object Type</p></div>
<p>Next screen ask you to select the tables which you want to generate the data from. Select whatever the tables and click next</p>
<div class="wp-caption alignnone" style="width: 411px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image031.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script Wizard - Choose Tables" alt="SQL Server Generate Script Wizard - Choose Tables" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image031_thumb.jpg?w=401&#038;h=363" width="401" height="363" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script Wizard &#8211; Choose Tables</p></div>
<p>Next step ask to specify the output options. If you select “Script to file” as an option, then you can enter the file name and the location there.</p>
<div class="wp-caption alignnone" style="width: 415px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image033.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script Wizard - Output Option" alt="SQL Server Generate Script Wizard - Output Option" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image033_thumb.jpg?w=405&#038;h=367" width="405" height="367" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script Wizard &#8211; Output Option</p></div>
<p>Next two steps are very strait forward. It shows the script generation summary, and by clicking next it will generate the script with insert statements for the selected tables.</p>
<div class="wp-caption alignnone" style="width: 419px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image035.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script Wizard - Script Summary" alt="SQL Server Generate Script Wizard - Script Summary" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image035_thumb.jpg?w=409&#038;h=370" width="409" height="370" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script Wizard &#8211; Script Summary</p></div>
<div class="wp-caption alignnone" style="width: 416px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image037.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script Wizard - Script Progress" alt="SQL Server Generate Script Wizard - Script Progress" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image037_thumb.jpg?w=406&#038;h=367" width="406" height="367" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script Wizard &#8211; Script Progress</p></div>
<div class="wp-caption alignnone" style="width: 417px"><a href="http://tharakaweb.files.wordpress.com/2013/05/clip_image039.jpg"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Server Generate Script Wizard - Generated Script" alt="SQL Server Generate Script Wizard - Generated Script" src="http://tharakaweb.files.wordpress.com/2013/05/clip_image039_thumb.jpg?w=407&#038;h=234" width="407" height="234" border="0" /></a><p class="wp-caption-text">SQL Server Generate Script Wizard &#8211; Generated Script</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/329/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=329&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/05/25/generate-insert-statements-from-the-specific-table-data-using-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image002_thumb.jpg" medium="image">
			<media:title type="html">SQLPubWiz location</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image004_thumb.jpg" medium="image">
			<media:title type="html">Database Publishing Wizard</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image006_thumb.jpg" medium="image">
			<media:title type="html">Database Publishing Wizard - Database Server Connection</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image008_thumb.jpg" medium="image">
			<media:title type="html">Database Publishing Wizard - Select Database</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image010_thumb.jpg" medium="image">
			<media:title type="html">Database Publishing Wizard - Choose Object Type</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image012_thumb.jpg" medium="image">
			<media:title type="html">Database Publishing Wizard - Choose Tables</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image014_thumb.jpg" medium="image">
			<media:title type="html">Database Publishing Wizard - Select an Output Location</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image016_thumb.jpg" medium="image">
			<media:title type="html">Database Publishing Wizard - Select Publishing Option</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image018_thumb.jpg" medium="image">
			<media:title type="html">Database Publishing Wizard - Publishing Progress</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image019_thumb.png" medium="image">
			<media:title type="html">Database Publishing Wizard - Generated Script</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image021_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image023_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script - Wizard Dialog</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image025_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script Wizard - Select Database</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image027_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script Wizard - Choose Script Option</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image029_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script Wizard - Choose Object Type</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image031_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script Wizard - Choose Tables</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image033_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script Wizard - Output Option</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image035_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script Wizard - Script Summary</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image037_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script Wizard - Script Progress</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/clip_image039_thumb.jpg" medium="image">
			<media:title type="html">SQL Server Generate Script Wizard - Generated Script</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Fix Orphaned SQL Users</title>
		<link>http://tharakaweb.com/2013/05/16/how-to-fix-orphaned-sql-users/</link>
		<comments>http://tharakaweb.com/2013/05/16/how-to-fix-orphaned-sql-users/#comments</comments>
		<pubDate>Thu, 16 May 2013 15:57:17 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[logon]]></category>
		<category><![CDATA[orphaned user]]></category>
		<category><![CDATA[secure identifier]]></category>
		<category><![CDATA[server migration]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[SQL 2005]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=274</guid>
		<description><![CDATA[Recently I had to involve in a database migration task. I backed up the database and restored successfully in the new server. However when I access the database through the web site, database login didn&#8217;t work. The problem was even though the database user is included in the restored database; the login information was not there. So [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=274&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I had to involve in a database migration task. I backed up the database and restored successfully in the new server. However when I access the database through the web site, database login didn&#8217;t work. The problem was even though the database user is included in the restored database; the login information was not there. So I re-created the login in the server, but it also didn&#8217;t work.</p>
<p>This phenomenon is called &#8220;<strong><span style="text-decoration:underline;">orphaned users</span></strong>&#8220;.</p>
<p><a href="http://tharakaweb.files.wordpress.com/2013/05/image.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border-width:0;" title="Database with orphaned users" alt="Database with orphaned users" src="http://tharakaweb.files.wordpress.com/2013/05/image_thumb.png?w=302&#038;h=577" width="302" height="577" border="0" /></a></p>
<h2>Details of the Problem:</h2>
<p>User logon information is stored in the syslogins table in the master database. By changing servers, or by altering this information by rebuilding or restoring an old version of the master database, the information may be different from when the user database dump was created. If logons do not exist for the users, they will receive an error indicating &#8220;Login failed&#8221; while attempting to log on to the server. If the user logons do exist, but the SID (secure identifier) in master..syslogins and the sysusers table in the user database differ, the users may have different permissions than expected in the user database. (Microsoft et.al)</p>
<div class="wp-caption alignnone" style="width: 474px"><a href="http://tharakaweb.files.wordpress.com/2013/05/image1.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="User login information in syslogins table in the master database" alt="User login information in syslogins table in the master database" src="http://tharakaweb.files.wordpress.com/2013/05/image_thumb1.png?w=464&#038;h=85" width="464" height="85" border="0" /></a><p class="wp-caption-text">User login information in syslogins table in the master database</p></div>
<div class="wp-caption alignnone" style="width: 478px"><a href="http://tharakaweb.files.wordpress.com/2013/05/image2.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="User information in the sysusers table in the user database" alt="User information in the sysusers table in the user database" src="http://tharakaweb.files.wordpress.com/2013/05/image_thumb2.png?w=468&#038;h=118" width="468" height="118" border="0" /></a><p class="wp-caption-text">User information in the sysusers table in the user database</p></div>
<p>See above example, both tables contain the different SID for the username “eyepax”</p>
<h2>How to fix:</h2>
<p>1. The easiest way to fix this is delete the user from the restored database and then create and setup the user &amp; corresponding permission to the database.</p>
<p>2. If the user owns a schema in the database, you won’t be able to delete the user. Then you can use the special stored procedure “<em><span style="text-decoration:underline;">sp_change_users_login</span></em>”.</p>
<p><span style="text-decoration:underline;"><strong>Syntax</strong></span></p>
<blockquote><p><b>sp_change_users_login</b> [ <b>@Action</b> <b>= </b>] <b>&#8216;</b><i>action</i><b>&#8216;</b><br />
[ <b>, </b>[ <b>@UserNamePattern</b> <b>= </b>] <b>&#8216;</b><i>user</i><b>&#8216; </b>]<br />
[ <b>, </b>[ <b>@LoginName</b> <b>= </b>] <b>&#8216;</b><i>login</i><b>&#8216; </b>]<br />
[ <b>, </b>[ <b>@Password</b> <b>= </b>] <b>&#8216;</b><i>password</i><b>&#8216; </b>]</p>
<p>Arguments</p>
<p>[<b>@Action</b> <b>=</b>] <b>&#8216;</b><i>action</i><b>&#8216;</b></p></blockquote>
<p>Following are the list of actions can be performed by the procedure.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="133"><b>Value</b></td>
<td valign="top" width="1743"><b>Description</b></td>
</tr>
<tr>
<td valign="top" width="133"><b>Auto_Fix</b></td>
<td valign="top" width="1743">Links a user entry in the<b> sysusers</b> table in the current database to a login of the same name in <b>sysxlogins</b>.<b> </b>You should check the result from the<b>Auto_Fix</b> statement to confirm that the correct link is in fact made. Avoid using <b>Auto_Fix</b> in security-sensitive situations.<br />
When using <b>Auto_Fix</b>, you must specify <i>user</i> and <i>password</i>; <i>login</i> must be NULL. <i>user</i> must be a valid user in the current database.</td>
</tr>
<tr>
<td valign="top" width="133"><b>Report</b></td>
<td valign="top" width="1743">Lists the users and corresponding security identifiers (SID) in the current database that are not linked to any login.<br />
<i>user</i>, <i>login</i>, and<i> password</i> must be NULL or not specified.</td>
</tr>
<tr>
<td valign="top" width="133"><b>Update_One</b></td>
<td valign="top" width="1743">Links the specified <i>user</i> in the current database to <i>login. login</i> must already exist. <i>user</i> and <i>login</i> must be specified. <i>password</i> must be NULL or not specified.</td>
</tr>
</tbody>
</table>
<p>To perform the operations, first you have to select the database which contained the issues. Here are some of the operations you can perform.</p>
<ul>
<li>Lists the orphaned users</li>
</ul>
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:dcfc1bd9-198a-4ce8-bbb0-b48412cce9cd" style="float:none;margin:0;display:inline;padding:0;">
<pre class="brush: sql; pad-line-numbers: true; title: ; notranslate">
EXEC sp_change_users_login 'Report'
</pre>
</div>
<div class="wp-caption alignnone" style="width: 397px"><a href="http://tharakaweb.files.wordpress.com/2013/05/image3.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Lists the orphaned users" alt="Lists the orphaned users" src="http://tharakaweb.files.wordpress.com/2013/05/image_thumb3.png?w=387&#038;h=136" width="387" height="136" border="0" /></a><p class="wp-caption-text">Lists the orphaned users</p></div>
<ul>
<li>If you already create a SQL server with same login information and if you want to map that with the database user</li>
</ul>
<pre class="brush: sql; title: ; notranslate">
EXEC sp_change_users_login 'Auto_Fix', 'user'
</pre>
<div class="wp-caption alignnone" style="width: 660px"><a href="http://tharakaweb.files.wordpress.com/2013/05/image4.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Auto fix orphaned user" alt="Auto fix orphaned user" src="http://tharakaweb.files.wordpress.com/2013/05/image_thumb4.png?w=650&#038;h=125" width="650" height="125" border="0" /></a><p class="wp-caption-text">Auto fix orphaned user</p></div>
<p>3. MSDN says, maps an existing database user to a SQL Server login. sp_change_users_login feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use <a href="http://msdn.microsoft.com/en-us/library/ms176060(v=sql.105).aspx">ALTER USER</a> instead.</p>
<p><span style="text-decoration:underline;"><strong>Syntax</strong></span></p>
<blockquote><p>ALTER USER userName<br />
WITH &lt;set_item&gt; [ ,...n ]</p>
<p>&lt;set_item&gt; ::=<br />
NAME = newUserName<br />
| DEFAULT_SCHEMA = schemaName<br />
| LOGIN = loginName</p>
<p>Argument</p>
<p><strong>userName</strong> -Specifies the name by which the user is identified inside this database.<br />
<strong>LOGIN</strong> =loginName, Re-maps a user to another login by changing the user&#8217;s Security Identifier (SID) to match the login&#8217;s SID.<br />
<strong>NAME</strong> =newUserName, Specifies the new name for this user. newUserName must not already occur in the current database.<br />
<strong>DEFAULT_SCHEMA</strong> =schemaName, Specifies the first schema that will be searched by the server when it resolves the names of objects for this user.</p></blockquote>
<pre class="brush: sql; title: ; notranslate">
ALTER USER UserName WITH LOGIN = UserName
</pre>
<div class="wp-caption alignnone" style="width: 486px"><a href="http://tharakaweb.files.wordpress.com/2013/05/image5.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Alter user" alt="Alter user" src="http://tharakaweb.files.wordpress.com/2013/05/image_thumb5.png?w=476&#038;h=155" width="476" height="155" border="0" /></a><p class="wp-caption-text">Alter user</p></div>
<p>For more information</p>
<p><em><strong>sp_change_users_login</strong></em><br />
<a href="http://msdn.microsoft.com/en-us/library/ms174378(v=sql.110).aspx">http://msdn.microsoft.com/en-us/library/ms174378(v=sql.110).aspx</a></p>
<p><strong><em>ALTER USER</em></strong><br />
<a href="http://msdn.microsoft.com/en-us/library/ms176060.aspx">http://msdn.microsoft.com/en-us/library/ms176060.aspx</a></p>
<p><strong><em>Troubleshoot Orphaned Users (SQL Server)</em></strong><br />
<a href="http://msdn.microsoft.com/en-us/library/ms175475.aspx">http://msdn.microsoft.com/en-us/library/ms175475.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/274/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=274&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/05/16/how-to-fix-orphaned-sql-users/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/image_thumb.png" medium="image">
			<media:title type="html">Database with orphaned users</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/image_thumb1.png" medium="image">
			<media:title type="html">User login information in syslogins table in the master database</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/image_thumb2.png" medium="image">
			<media:title type="html">User information in the sysusers table in the user database</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/image_thumb3.png" medium="image">
			<media:title type="html">Lists the orphaned users</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/image_thumb4.png" medium="image">
			<media:title type="html">Auto fix orphaned user</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/05/image_thumb5.png" medium="image">
			<media:title type="html">Alter user</media:title>
		</media:content>
	</item>
		<item>
		<title>SMTP, POP3 and IMAP</title>
		<link>http://tharakaweb.com/2013/05/03/smtp-pop3-and-imap/</link>
		<comments>http://tharakaweb.com/2013/05/03/smtp-pop3-and-imap/#comments</comments>
		<pubDate>Fri, 03 May 2013 10:53:31 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[Protocol]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[mail imap]]></category>
		<category><![CDATA[mail transfer protocol]]></category>
		<category><![CDATA[post office protocol]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[simple mail transfer protocol]]></category>
		<category><![CDATA[smtp starttls]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tcp/ip]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=257</guid>
		<description><![CDATA[SMTP, POP3 and IMAP are TCP/IP protocols used for mail delivery. Email clients use POP3 and IMAP protocol to retrieve email from the server (incoming mail) over TCP/IP connection. Outgoing mail for both POP and IMAP clients uses the SMTP. Main difference between POP3 and IMAP is, POP3 – Downloads email locally IMAP – Mail [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=257&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>SMTP, POP3 and IMAP are TCP/IP protocols used for mail delivery. Email clients use POP3 and IMAP protocol to retrieve email from the server (incoming mail) over TCP/IP connection. Outgoing mail for both POP and IMAP clients uses the SMTP. Main difference between POP3 and IMAP is,</p>
<ul>
<li>POP3 – Downloads email locally
<li>IMAP – Mail is stored on the mail server</li>
</ul>
<h2>SMTP</h2>
<p>Simple Mail Transfer Protocol (SMTP) servers handle the sending of your e mail messages to the Internet. The SMTP server handles outgoing e mail, and is used in conjunction with a POP3 or IMAP incoming e mail server.</p>
<h2>POP3</h2>
<p>Post Office Protocol 3 (POP3) servers hold incoming e mail messages until you check your e mail, at which point they&#8217;re transferred to your computer. POP3 is the most common account type for personal e mail. Messages are typically deleted from the server when you check your e mail.</p>
<h2>IMAP</h2>
<p>Internet Message Access Protocol (IMAP) servers let you work with e mail messages without downloading them to your computer first. You can preview, delete, and organize messages directly on the e mail server, and copies are stored on the server until you choose to delete them. IMAP is commonly used for business e mail accounts.</p>
<p><u>Default Ports</u></p>
<ul>
<li>SMTP AUTH: Port 25 or 587 (some ISPs are blocking port 25)
<li>SMTP StartTLS Port 587
<li>SMTP SSL Port 465
<li>POP Port 110
<li>POP SSL Port 995
<li>IMAP Port 143
<li>IMAP SSL Port 993
<li>IMAP StartTLS Port 143</li>
</ul>
<p>The following list of SMTP, POP3, and IMAP server should help you if you don&#8217;t know what mail server you should use for your mail account.</p>
<table style="border-collapse:collapse;line-height:normal;width:530pt;" cellspacing="0" cellpadding="0" width="800" border="0">
<col style="width:80pt;" width="200">
<col style="width:110pt;" width="200">
<col style="width:110pt;" width="200">
<col style="width:110pt;" width="200">
<tbody>
<tr style="height:27pt;">
<td class="xl68" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:middle;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#b8cce4;padding:1px 1px 0;" height="36" width="158"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl68" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:middle;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#b8cce4;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>SMTP</strong></font></font></td>
<td class="xl68" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:middle;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#b8cce4;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>POP3</strong></font></font></td>
<td class="xl68" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:middle;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#b8cce4;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>IMAP</strong></font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl69" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>Gmail</strong></font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">smtp.gmail.com</font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">pop.gmail.com</font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">imap.gmail.com</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl69" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 465</font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 995</font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 993</font></font></td>
</tr>
<tr style="height:45pt;">
<td class="xl70" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="60"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl66" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">StartTLS Port 587<br />TLS/SSL encryption required: yes</font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">Please make sure, that POP3 access is enabled in the account settings. Login to your account and enable POP3.</font></font></td>
<td class="xl66" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">Please make sure, that IMAP access is enabled in the account settings. Login to your account and enable IMAP.</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl78" style="border-top:medium none;border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>Outlook.com</strong></font></font></td>
<td class="xl79" style="border-top:medium none;vertical-align:top;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">smtp.live.com</font></font></td>
<td class="xl80" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">pop3.live.com</font></font></td>
<td class="xl81" style="border-top:medium none;border-right:windowtext .5pt solid;vertical-align:top;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">imap.mail.yahoo.com</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl86" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl91" style="vertical-align:top;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">StartTLS Port 587</font></font></td>
<td class="xl88" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 995</font></font></td>
<td class="xl85" style="border-right:windowtext .5pt solid;vertical-align:top;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 993</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl82" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl83" style="vertical-align:top;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">TLS/SSL encryption required: yes</font></font></td>
<td class="xl84" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">TLS/SSL encryption required: yes</font></font></td>
<td class="xl85" style="border-right:windowtext .5pt solid;vertical-align:top;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">&nbsp;</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl71" style="border-top:medium none;border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>Yahoo Mail</strong></font></font></td>
<td class="xl73" style="border-top:medium none;vertical-align:top;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">smtp.mail.yahoo.com</font></font></td>
<td class="xl74" style="vertical-align:top;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">pop.mail.yahoo.com</font></font></td>
<td class="xl67" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">&nbsp;</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl75" style="vertical-align:top;border-bottom:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 465</font></font></td>
<td class="xl76" style="vertical-align:top;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 995</font></font></td>
<td class="xl66" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">&nbsp;</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl86" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>Yahoo Mail Plus</strong></font></font></td>
<td class="xl87" style="vertical-align:top;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">plus.smtp.mail.yahoo.com</font></font></td>
<td class="xl88" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">plus.pop.mail.yahoo.com</font></font></td>
<td class="xl88" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">plus.imap.mail.yahoo.com</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl82" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl89" style="vertical-align:top;border-bottom:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 465</font></font></td>
<td class="xl84" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 995</font></font></td>
<td class="xl84" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 993</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl69" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>Yahoo UK</strong></font></font></td>
<td class="xl77" style="vertical-align:top;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">smtp.mail.yahoo.co.uk</font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">pop.mail.yahoo.co.uk</font></font></td>
<td class="xl65" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">imap.mail.yahoo.co.uk</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl75" style="vertical-align:top;border-bottom:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 465</font></font></td>
<td class="xl66" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 995</font></font></td>
<td class="xl66" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 993</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl86" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>Yahoo Deutschland</strong></font></font></td>
<td class="xl87" style="vertical-align:top;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">smtp.mail.yahoo.de</font></font></td>
<td class="xl88" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">pop.mail.yahoo.de</font></font></td>
<td class="xl88" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">imap.mail.yahoo.de</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl86" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl87" style="vertical-align:top;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 465</font></font></td>
<td class="xl88" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 995</font></font></td>
<td class="xl88" style="border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 993</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl71" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>Yahoo AU/NZ</strong></font></font></td>
<td class="xl73" style="border-top:windowtext .5pt solid;vertical-align:top;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">smtp.mail.yahoo.com.au</font></font></td>
<td class="xl67" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">pop.mail.yahoo.com.au</font></font></td>
<td class="xl67" style="border-top:windowtext .5pt solid;border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">imap.mail.yahoo.com.au</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl70" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl75" style="vertical-align:top;border-bottom:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 465</font></font></td>
<td class="xl66" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ebf1de;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 995</font></font></td>
<td class="xl66" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#ebf1de;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 993</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl78" style="border-top:medium none;border-right:windowtext .5pt solid;vertical-align:bottom;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>Windows Live (Hotmail)</strong></font></font></td>
<td class="xl90" style="border-top:medium none;vertical-align:top;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">smtp.live.com</font></font></td>
<td class="xl80" style="border-top:medium none;border-right:windowtext .5pt solid;vertical-align:top;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">pop3.live.com</font></font></td>
<td class="xl80" style="border-top:medium none;border-right:windowtext .5pt solid;vertical-align:top;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">&nbsp;</font></font></td>
</tr>
<tr style="height:15pt;">
<td class="xl82" style="border-right:windowtext .5pt solid;vertical-align:bottom;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" height="20"><font face="Calibri"><font style="font-size:11pt;" color="#000000"><strong>&nbsp;</strong></font></font></td>
<td class="xl89" style="vertical-align:top;border-bottom:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="258"><font face="Calibri"><font style="font-size:11pt;" color="#001020">StartTLS Port 587</font></font></td>
<td class="xl84" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:windowtext .5pt solid;background-color:#ecf9bd;padding:1px 1px 0;" width="340"><font face="Calibri"><font style="font-size:11pt;" color="#001020">SSL Port 995</font></font></td>
<td class="xl84" style="border-right:windowtext .5pt solid;vertical-align:top;border-bottom:windowtext .5pt solid;border-left:medium none;background-color:#ecf9bd;padding:1px 1px 0;" width="290"><font face="Calibri"><font style="font-size:11pt;" color="#001020">&nbsp;</font></font></td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/257/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=257&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/05/03/smtp-pop3-and-imap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>
	</item>
		<item>
		<title>JavaScript Frameworks and Resources</title>
		<link>http://tharakaweb.com/2013/04/29/javascript-framework-and-resources/</link>
		<comments>http://tharakaweb.com/2013/04/29/javascript-framework-and-resources/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 08:42:15 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[client side]]></category>
		<category><![CDATA[client side scripts]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[javascript runtime]]></category>
		<category><![CDATA[javascript variables]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[model view controller]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[rich api]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Style]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=249</guid>
		<description><![CDATA[Knockout.js Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), KO can help you implement it more [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=249&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2>Knockout.js</h2>
<p>Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), KO can help you implement it more simply and maintainably.<br />
<a href="http://knockoutjs.com/">http://knockoutjs.com/</a><br />
<a title="knockout.js" href="http://knockoutjs.com/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Knockout.js" alt="Knockout.js" src="http://tharakaweb.files.wordpress.com/2013/04/image.png?w=391&#038;h=125" width="391" height="125" border="0" /></a></p>
<h2>Angular.js</h2>
<p>AngularJS is an open-source JavaScript framework, maintained by Google, that assists with running what are known as single-page applications. Its goal is to augment browser-based applications with model–view–controller (MVC) capability, in an effort to make both development and testing easier. The library reads in HTML that contains additional custom tag attributes; it then obeys the directives in those custom attributes, and binds input or output parts of the page to a model represented by standard JavaScript variables. The values of those JavaScript variables can be manually set, or retrieved from static or dynamic JSON resources.<br />
<a href="http://angularjs.org/">http://angularjs.org/</a><br />
<a title="Angular.js" href="http://angularjs.org/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Angular.js" alt="Angular.js" src="http://tharakaweb.files.wordpress.com/2013/04/image1.png?w=397&#038;h=116" width="397" height="116" border="0" /></a></p>
<h2>Backbone.js</h2>
<p>Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.<br />
<a href="http://backbonejs.org">http://backbonejs.org</a><br />
<a title="Backbone.js" href="http://backbonejs.org/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Backbone.js" alt="Backbone.js" src="http://tharakaweb.files.wordpress.com/2013/04/image2.png?w=385&#038;h=85" width="385" height="85" border="0" /></a></p>
<h2>Node.js</h2>
<p>Node.js is a platform built on Chrome&#8217;s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.<br />
<a href="http://nodejs.org/">http://nodejs.org/</a><br />
<a title="Node.js" href="http://nodejs.org/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Node.js" alt="Node.js" src="http://tharakaweb.files.wordpress.com/2013/04/image3.png?w=380&#038;h=99" width="380" height="99" border="0" /></a></p>
<h2>Modernizr</h2>
<p>Modernizr is a small JavaScript library that detects the availability of native implementations for next-generation web technologies, i.e. features that stem from the HTML5 and CSS3 specifications. Many of these features are already implemented in at least one major browser (most of them in two or more), and what Modernizr does is, very simply, tell you whether the current browser has this feature natively implemented or not.<br />
<a href="http://modernizr.com">http://modernizr.com</a><br />
<a title="Modernizr" href="http://modernizr.com" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Modernizr" alt="Modernizr" src="http://tharakaweb.files.wordpress.com/2013/04/image4.png?w=373&#038;h=120" width="373" height="120" border="0" /></a></p>
<h2>Require.js</h2>
<p>RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node. Using a modular script loader like RequireJS will improve the speed and quality of your code.<br />
<a href="http://requirejs.org">http://requirejs.org</a><br />
<a title="Require.js" href="http://requirejs.org/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Require.js" alt="Require.js" src="http://tharakaweb.files.wordpress.com/2013/04/image5.png?w=183&#038;h=200" width="183" height="200" border="0" /></a></p>
<h2>Less</h2>
<p>LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only).<br />
<a title="http://lesscss.org/" href="http://lesscss.org/">http://lesscss.org/</a><br />
<a href="http://tharakaweb.files.wordpress.com/2013/04/image6.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Less" alt="Less" src="http://tharakaweb.files.wordpress.com/2013/04/image_thumb.png?w=200&#038;h=76" width="200" height="76" border="0" /></a></p>
<h2>Sass</h2>
<p>Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.<br />
<a href="http://sass-lang.com">http://sass-lang.com</a><br />
<a href="http://tharakaweb.files.wordpress.com/2013/04/sass.jpg" target="_blank"><img class="alignnone size-full wp-image-255" alt="Saas" src="http://tharakaweb.files.wordpress.com/2013/04/sass.jpg?w=683"   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/249/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=249&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/04/29/javascript-framework-and-resources/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/04/image.png" medium="image">
			<media:title type="html">Knockout.js</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/04/image1.png" medium="image">
			<media:title type="html">Angular.js</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/04/image2.png" medium="image">
			<media:title type="html">Backbone.js</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/04/image3.png" medium="image">
			<media:title type="html">Node.js</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/04/image4.png" medium="image">
			<media:title type="html">Modernizr</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/04/image5.png" medium="image">
			<media:title type="html">Require.js</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/04/image_thumb.png" medium="image">
			<media:title type="html">Less</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/04/sass.jpg" medium="image">
			<media:title type="html">Saas</media:title>
		</media:content>
	</item>
		<item>
		<title>HTML5 Cheat Sheet</title>
		<link>http://tharakaweb.com/2013/02/25/html5-cheat-sheet/</link>
		<comments>http://tharakaweb.com/2013/02/25/html5-cheat-sheet/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 16:46:58 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[client side]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[sheet tags]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=239</guid>
		<description><![CDATA[HTML5 Cheat Sheet – Tags HTML5 Cheat Sheet By InMotion Hosting &#8211; A Virtual Private Servers Provider HTML5 Cheat Sheet &#8211; Event Handler Attributes HTML5 Cheat Sheet By InMotion Hosting &#8211; A Web Hosting Provider HTML5 Cheat Sheet &#8211; Browser Support HTML5 Cheat Sheet By InMotion Hosting &#8211; A Dedicated Server Provider<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=239&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2>HTML5 Cheat Sheet – Tags</h2>
<p><a href="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_tags.png" target="_blank"><img alt="HTML5 Cheat Sheet - Tags" src="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_tags-670x460.png" width="670" height="460" border="0" /></a></p>
<div>HTML5 Cheat Sheet By InMotion Hosting &#8211; A <a href="http://www.inmotionhosting.com/vps-hosting">Virtual Private Servers</a> Provider</div>
<h2>HTML5 Cheat Sheet &#8211; Event Handler Attributes</h2>
<p><a href="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_event_attributes.png" target="_blank"><img alt="HTML5 Cheat Sheet - Event Handler Attributes" src="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_event_attributes-670x460.png" width="670" height="460" border="0" /></a></p>
<div>HTML5 Cheat Sheet By InMotion Hosting &#8211; A <a href="http://www.inmotionhosting.com/">Web Hosting</a> Provider</div>
<h2>HTML5 Cheat Sheet &#8211; Browser Support</h2>
<p><a href="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_browser_support.png" target="_blank"><img alt="HTML5 Cheat Sheet - Browser Support" src="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_browser_support-670x460.png" width="670" height="460" border="0" /></a></p>
<div>HTML5 Cheat Sheet By InMotion Hosting &#8211; A <a href="http://www.inmotionhosting.com/dedicated-servers">Dedicated Server</a> Provider</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=239&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/02/25/html5-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>

		<media:content url="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_tags-670x460.png" medium="image">
			<media:title type="html">HTML5 Cheat Sheet - Tags</media:title>
		</media:content>

		<media:content url="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_event_attributes-670x460.png" medium="image">
			<media:title type="html">HTML5 Cheat Sheet - Event Handler Attributes</media:title>
		</media:content>

		<media:content url="http://www.inmotionhosting.com/img/infographics/html5_cheat_sheet_browser_support-670x460.png" medium="image">
			<media:title type="html">HTML5 Cheat Sheet - Browser Support</media:title>
		</media:content>
	</item>
		<item>
		<title>Online tools for troubleshooting web, SQL, XML and JSON</title>
		<link>http://tharakaweb.com/2013/02/18/online-tools-for-troubleshooting-web-sql-xml-json/</link>
		<comments>http://tharakaweb.com/2013/02/18/online-tools-for-troubleshooting-web-sql-xml-json/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 06:44:04 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[client side scripts]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[database problems]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html css]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[javascript css]]></category>
		<category><![CDATA[online tool]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Style]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=228</guid>
		<description><![CDATA[Have you ever wanted to trouble shot someone else web page which contains the combination of JavaScript, CSS and HTML? Have you ever wanted to troubleshoot someone else SQL query without entering to the SQL server? Here are some useful online tool which make your life easier. Following tools provide an online debugging environment for [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=228&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Have you ever wanted to trouble shot someone else web page which contains the combination of JavaScript, CSS and HTML? Have you ever wanted to troubleshoot someone else SQL query without entering to the SQL server? Here are some useful online tool which make your life easier.</p>
<p>Following tools provide an online debugging environment for HTML, CSS and JavaScript.</p>
<p><strong>1. jsFiddle</strong></p>
<p>jsFiddle is the most popular JavaScript sandbox. It provides instantly ready coding environment for you to begin experimenting in as soon as the page loads.</p>
<p><a title="JS FIDDLE" href="http://jsfiddle.net/" target="_blank">http://jsfiddle.net/</a></p>
<p><a title="JS FIDDLE" href="http://jsfiddle.net/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="JS Fiddle" alt="JS Fiddle" src="http://tharakaweb.files.wordpress.com/2013/02/image1.png?w=370&#038;h=273" width="370" height="273" border="0" /></a></p>
<p><strong>2. JS Bin</strong></p>
<p>JS Bin is another JavaScript sandbox. The design of this app is quite minimal and really allows you to focus on the code. By default, the page only shows the HTML and lives preview panes, but you can easily add JavaScript to that as well.</p>
<p><a title="JS BIN" href="http://jsbin.com/" target="_blank">http://jsbin.com/</a></p>
<p><a title="JS BIN" href="http://jsbin.com/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="JS Bin" alt="JS Bin" src="http://tharakaweb.files.wordpress.com/2013/02/image2.png?w=370&#038;h=276" width="370" height="276" border="0" /></a></p>
<p><strong>3. CSSDesk</strong></p>
<p>CSSDesk is a CSS sandbox which allows you to put your HTML and CSS codes there and view the preview instantly. It is very useful for testing out codes before implementing them in your website permanently.</p>
<p><a title="CSS Desk" href="http://cssdesk.com/" target="_blank">http://cssdesk.com/</a></p>
<p><a title="CSS Desk" href="http://cssdesk.com/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="CSS Desk" alt="CSS Desk" src="http://tharakaweb.files.wordpress.com/2013/02/image3.png?w=370&#038;h=276" width="370" height="276" border="0" /></a></p>
<p><strong>4. CodePen</strong></p>
<p>CodePen is an app for sharing and playing around with front end code. It&#8217;s a site for building stuff from HTML, CSS and JavaScript.</p>
<p><a title="Code Pen" href="http://codepen.io/pen/" target="_blank">http://codepen.io/pen/</a></p>
<p><a title="Code Pen" href="http://codepen.io/pen/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Code Pen" alt="Code Pen" src="http://tharakaweb.files.wordpress.com/2013/02/image4.png?w=370&#038;h=176" width="370" height="176" border="0" /></a></p>
<p>Following tool can use for easy online testing and sharing of database problems and solutions.</p>
<p><strong>1. SQL Fiddle</strong></p>
<p>SQL Fiddle is a tool for easy online testing and sharing of database problems and their solutions. If you do not know SQL or basic database concepts, this site is not going to be very useful to you. However, if you are a database developer, there are a few different use-cases of SQL Fiddle intended for you:</p>
<ul>
<li>You want help with a tricky query, and you&#8217;d like to post a question to a Q/A site</li>
<li>You want to compare and contrast SQL statements in different database back-ends</li>
<li>You do not have a particular database platform readily available, but you would like to see what a given query would look like in that environment</li>
</ul>
<p><a title="SQL Fiddle" href="http://sqlfiddle.com/" target="_blank">http://sqlfiddle.com/</a></p>
<p><a title="SQL Fiddle" href="http://sqlfiddle.com/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="SQL Fiddle" alt="SQL Fiddle" src="http://tharakaweb.files.wordpress.com/2013/02/image5.png?w=370&#038;h=180" width="370" height="180" border="0" /></a></p>
<p>Following tools act as sandbox environment for JSON,  XML development, including (E)XSLT, XML validation (DTD, schema, RelaxNG) and XQuery.</p>
<p><strong>1. XMLPlayground</strong></p>
<p>XMLPlayground is a sandbox environment for XML development, including (E)XSLT, XML validation (DTD, schema, RelaxNG) and XQuery. It has five development panels into which you can either insert or upload code:</p>
<ul>
<li>XML &#8211; your source XML. You can render it as a node tree via the &#8216;tree&#8217; tab.</li>
<li>(E)XSLT &#8211; transform your XML with XSLT (1.0). EXSLT an XSL includes are supported.</li>
<li>Validation &#8211; validate your XML with Schema, DTD or RelaxNG.</li>
<li>CSS &#8211; style your output</li>
<li>XQuery &#8211; query or transform your XML with XQuery code (via XQIB)</li>
</ul>
<p><a title="XML Play Ground" href="http://xmlplayground.com/" target="_blank">http://xmlplayground.com/</a></p>
<p><a href="http://xmlplayground.com/"><img class="alignnone  wp-image-233" title="XML Playground" alt="XML Playground" src="http://tharakaweb.files.wordpress.com/2013/02/xmlplaground.jpg?w=370&#038;h=180" width="370" height="180" /></a></p>
<p><strong>2. JSON Fiddle</strong></p>
<p>With JSON Fiddle, simulating and posting JSON in Fiddler is just as easy.</p>
<p><strong></strong><a title="JSON Fiddle" href="http://jsonfiddle.net" target="_blank">http://jsonfiddle.net</a></p>
<p><a href="http://jsonfiddle.net"><img class="alignnone  wp-image-232" title="json fiddle" alt="json fiddle" src="http://tharakaweb.files.wordpress.com/2013/02/jsonfiddle.jpg?w=370&#038;h=180" width="370" height="180" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=228&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/02/18/online-tools-for-troubleshooting-web-sql-xml-json/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/02/image1.png" medium="image">
			<media:title type="html">JS Fiddle</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/02/image2.png" medium="image">
			<media:title type="html">JS Bin</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/02/image3.png" medium="image">
			<media:title type="html">CSS Desk</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/02/image4.png" medium="image">
			<media:title type="html">Code Pen</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/02/image5.png" medium="image">
			<media:title type="html">SQL Fiddle</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/02/xmlplaground.jpg" medium="image">
			<media:title type="html">XML Playground</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/02/jsonfiddle.jpg" medium="image">
			<media:title type="html">json fiddle</media:title>
		</media:content>
	</item>
		<item>
		<title>Counting Consecutive Dates Using SQL</title>
		<link>http://tharakaweb.com/2013/02/16/sql-counting-consecutive-dates/</link>
		<comments>http://tharakaweb.com/2013/02/16/sql-counting-consecutive-dates/#comments</comments>
		<pubDate>Sat, 16 Feb 2013 10:52:33 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[language text]]></category>
		<category><![CDATA[SQL 2005]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[SQL 2012]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=216</guid>
		<description><![CDATA[Download demo query Recently I have answered one of the SQL based question in the CodeProject. Thanks for the participant that question wake up me to write this blog post. Question: He has a table (tblLeave) with the data like below. And he wants to output the data as below Condition: If same type of [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=216&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a title="Download demo query" href="http://sdrv.ms/12V2kv7" target="_blank">Download demo query</a></p>
<p>Recently I have answered one of the SQL based question in the CodeProject. Thanks for the participant that question wake up me to write this blog post.</p>
<h2>Question:</h2>
<p>He has a table (<strong>tblLeave</strong>) with the data like below.</p>
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:618fb261-5e85-448a-94af-7a57213d132f" style="float:none;margin:0;display:inline;padding:0;">
<pre class="brush: plain; pad-line-numbers: true; title: ; notranslate">
PAYCODE		LV_TYPE	FROM_DATE		TO_DATE	        	LVALUE
5023		SL    	14/12/2012 0:00		14/12/2012 0:00		1
5023		SL    	15/12/2012 0:00		15/12/2012 0:00		1
5023		COF   	16/12/2012 0:00		16/12/2012 0:00		1
5023		SL    	19/12/2012 0:00		19/12/2012 0:00		1
5023		SL    	22/12/2012 0:00		22/12/2012 0:00		1
5023		SL    	23/12/2012 0:00		23/12/2012 0:00		1
5023		SL    	24/12/2012 0:00		24/12/2012 0:00		1
5023		PL    	28/12/2012 0:00		28/12/2012 0:00		1
5023		PL    	29/12/2012 0:00		29/12/2012 0:00		1
5023		PL    	30/12/2012 0:00		30/12/2012 0:00		1
5023		PL    	31/12/2012 0:00		31/12/2012 0:00		1
</pre>
</div>
<p>And he wants to output the data as below</p>
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:9320753e-1930-4c96-9a56-89eee0e3da94" style="float:none;margin:0;display:inline;padding:0;">
<pre class="brush: plain; title: ; notranslate">
PAYCODE LV_TYPE FROM_DATE       TO_DATE         LVALUE
5023    SL      14/12/2012 0:00 15/12/2012 0:00 2
5023    COF     16/12/2012 0:00 16/12/2012 0:00 1
5023    SL      19/12/2012 0:00 19/12/2012 0:00 1
5023    SL      22/12/2012 0:00 24/12/2012 0:00 3
5023    PL      28/12/2012 0:00 31/12/2012 0:00 4
</pre>
</div>
<p>Condition: If same type of leave taken continuously, it should be merged in one row mentioning <strong>from_date</strong> to <strong>to_date</strong>.</p>
<h2>Answer:</h2>
<p>When I saw that question first time, I didn’t go through in details and just thought that was an easy grouping query. And I just gave following answer.</p>
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:97572e97-cc31-42ca-b212-a360743f77a8" style="float:none;margin:0;display:inline;padding:0;">
<pre class="brush: sql; title: ; notranslate">
SELECT LV_TYPE,LV_TYPE,MIN(FROM_DATE) AS FROM_DATE ,MAX(TO_DATE) AS TO_DATE, COUNT(LVALUEP) AS LVALUE
FROM tblLeave
GROUP BY PAYCODE,LV_TYPE
</pre>
</div>
<p>But that’s wrong, he made comments saying it doesn’t make sense and highlighted the condition he wants. (Thanks for him; he didn’t down vote my answer). Again I read the question&#8230; Oh&#8230; That was a tricky question. He needs to group the leave by consecutive date. Isn’t that tricky?</p>
<p>To answer that, I use the <strong>DATEDIFF</strong> <strong>SQL</strong> function</p>
<blockquote><p>DATEDIFF ( datepart , startdate , enddate )</p></blockquote>
<p><a title="SQL DATEDIFF function" href="http://msdn.microsoft.com/en-us/library/ms189794.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms189794.aspx</a></p>
<p>Following is my answer and the output</p>
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:750752ea-b4af-4404-a766-6e2451224764" style="float:none;margin:0;display:inline;padding:0;">
<pre class="brush: sql; title: ; notranslate">
SELECT PAYCODE,LV_TYPE, MIN(FROM_DATE) AS FROM_DATE,
       MAX(FROM_DATE) AS TO_DATE, COUNT('A') AS LVALUE
FROM (
SELECT PAYCODE,LV_TYPE,FROM_DATE,
    DATEDIFF(D, ROW_NUMBER() OVER(ORDER BY FROM_DATE), FROM_DATE) AS Diff
FROM tblLeave) AS dt
GROUP BY PAYCODE,LV_TYPE, Diff
ORDER BY FROM_DATE
</pre>
</div>
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:cf89683e-2b26-4901-b82d-85b7ef8cea3d" style="float:none;margin:0;display:inline;padding:0;">
<pre class="brush: plain; title: ; notranslate">
PAYCODE     LV_TYPE FROM_DATE               TO_DATE                 LVALUE
----------- ------- ----------------------- ----------------------- -----------
5023        SL      2012-12-14 00:00:00.000 2012-12-15 00:00:00.000 2
5023        COF     2012-12-16 00:00:00.000 2012-12-16 00:00:00.000 1
5023        SL      2012-12-19 00:00:00.000 2012-12-19 00:00:00.000 1
5023        SL      2012-12-22 00:00:00.000 2012-12-24 00:00:00.000 3
5023        PL      2012-12-28 00:00:00.000 2012-12-31 00:00:00.000 4
</pre>
</div>
<h3>Query Explanation:</h3>
<p>Before explain the logic see the following query and the output.</p>
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:670d971d-04f9-48b8-ae49-2a0f664e2306" style="float:none;margin:0;display:inline;padding:0;">
<pre class="brush: sql; title: ; notranslate">
SELECT PAYCODE,LV_TYPE,FROM_DATE,
	ROW_NUMBER() OVER(ORDER BY FROM_DATE) AS ROW_NUMBER,
    DATEDIFF(D, ROW_NUMBER() OVER(ORDER BY FROM_DATE), FROM_DATE) AS Diff
FROM tblLeave
</pre>
</div>
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:330bb1c2-af43-4b7b-9b47-b4bfaf80c967" style="float:none;margin:0;display:inline;padding:0;">
<pre class="brush: plain; title: ; notranslate">
PAYCODE     LV_TYPE FROM_DATE               ROW_NUMBER           Diff
----------- ------- ----------------------- -------------------- -----------
5023        SL      2012-12-14 00:00:00.000 1                    41254
5023        SL      2012-12-15 00:00:00.000 2                    41254
5023        COF     2012-12-16 00:00:00.000 3                    41254
5023        SL      2012-12-19 00:00:00.000 4                    41256
5023        SL      2012-12-22 00:00:00.000 5                    41258
5023        SL      2012-12-23 00:00:00.000 6                    41258
5023        SL      2012-12-24 00:00:00.000 7                    41258
5023        PL      2012-12-28 00:00:00.000 8                    41261
5023        PL      2012-12-29 00:00:00.000 9                    41261
5023        PL      2012-12-30 00:00:00.000 10                   41261
5023        PL      2012-12-31 00:00:00.000 11                   41261
</pre>
</div>
<p>By seen this, you will realize that above query generate the same <strong><em>Diff</em></strong>  value for all the consecutive dates. Now you can easily group this and get the counts as you like.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=216&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/02/16/sql-counting-consecutive-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>
	</item>
		<item>
		<title>Can I Use &#8230;</title>
		<link>http://tharakaweb.com/2013/02/12/can-i-use/</link>
		<comments>http://tharakaweb.com/2013/02/12/can-i-use/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 17:10:24 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[compatibility tables]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=211</guid>
		<description><![CDATA[Click below image to view compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=211&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Click below image to view compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers.</p>
<p><a title="Visit CanIUse.com" href="http://caniuse.com/" target="_blank"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="Click here to visit CanIUse.com" alt="CanIUse.com" src="http://tharakaweb.files.wordpress.com/2013/02/image.png?w=626&#038;h=273" width="626" height="273" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=211&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/02/12/can-i-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/02/image.png" medium="image">
			<media:title type="html">Click here to visit CanIUse.com</media:title>
		</media:content>
	</item>
		<item>
		<title>Generating and splitting a delimited string column</title>
		<link>http://tharakaweb.com/2013/01/21/generating-and-splitting-a-delimited-string-column/</link>
		<comments>http://tharakaweb.com/2013/01/21/generating-and-splitting-a-delimited-string-column/#comments</comments>
		<pubDate>Mon, 21 Jan 2013 09:49:32 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[delimited string]]></category>
		<category><![CDATA[SQL 2000]]></category>
		<category><![CDATA[SQL 2005]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[substring function]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=190</guid>
		<description><![CDATA[Download demo query &#8211; 1.6 KB Introduction Recently I have answered one of the Code Project questions, in brief the question was, how to split the delimited string and return as row values. This is one of the common questions we all are facing in our development. Not only splitting the delimited string, but also [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=190&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><!-- Start Article --></p>
<p><a title="Download demo query" href="http://sdrv.ms/VfDh3J" target="_blank">Download demo query &#8211; 1.6 KB</a></p>
<h2>Introduction</h2>
<p class=" ">Recently I have answered one of the Code Project questions, in brief the question was, how to split the delimited string and return as row values. This is one of the common questions we all are facing in our development. Not only splitting the delimited string, but also we struggle when creating the delimited strings using SQL.</p>
<p class=" ">In this article, I will show you how easily this can be done by using the SQL XQuery.</p>
<h3>Creating delimited strings</h3>
<p>Suppose we have a table called <code>DeveloperProject </code>to store the individual developer project list.</p>
<div>
<pre class="brush: sql; title: ; notranslate">
DECLARE @DeveloperProject Table(
 DeveoperID INT,
 ProjectCode VARCHAR(20)
)
INSERT INTO @DeveloperProject(DeveoperID, ProjectCode) VALUES(1,'CODE_PROJECT')
INSERT INTO @DeveloperProject(DeveoperID, ProjectCode) VALUES(1,'MSFT')
INSERT INTO @DeveloperProject(DeveoperID, ProjectCode) VALUES(1,'REPT_MOD')
INSERT INTO @DeveloperProject(DeveoperID, ProjectCode) VALUES(2,'MSFT')
INSERT INTO @DeveloperProject(DeveoperID, ProjectCode) VALUES(2,'CODE_PROJECT')
INSERT INTO @DeveloperProject(DeveoperID, ProjectCode) VALUES(3,'REPT_MOD')
</pre>
</div>
<p>Now we need to convert this as follows</p>
<div>
<pre class="brush: plain; title: ; notranslate">
DeveoperID  ProjectCodes
----------- ------------------------
1           CODE_PROJECT,MSFT,REPT_MOD
2           MSFT,CODE_PROJECT
3           REPT_MOD
</pre>
</div>
<p class=" ">There are many ways to do this. But here is the easiest way.</p>
<div>
<pre class="brush: sql; title: ; notranslate">
SELECT DeveoperID,
    REPLACE((SELECT ProjectCode AS'data()'
        FROM @DeveloperProject dp2
        WHERE dp2.DeveoperID = dp1.DeveoperID
    FOR XML PATH('')),' ',',')AS ProjectCodes
FROM @DeveloperProject dp1
GROUP BY DeveoperID
</pre>
</div>
<div><span style="font-size:10pt;font-family:'Courier New';line-height:115%;">Instead of <code>REPLACE</code> function you can also use the <code>SUBSTRING </code>function as below</span></div>
<div>
<pre class="brush: sql; title: ; notranslate">
SELECT DeveoperID,
    SUBSTRING((SELECT ','+ ProjectCode
        FROM @DeveloperProject dp2
        WHERE dp2.DeveoperID = dp1.DeveoperID
    FOR XML PATH('')), 2, 8000)AS ProjectCodes
FROM @DeveloperProject dp1
GROUP BY DeveoperID</pre>
</div>
<div><img title="Table with delimited column" alt="Table with delimited column" src="http://www.codeproject.com/KB/database/526912/delimitedresults.png" width="305" height="82" /></div>
<h4>FOR XML() clause</h4>
<div><span style="font-weight:normal;">A SELECT query returns results as a rowset. You can optionally retrieve formal results of a SQL query as XML by specifying the FOR XML clause in the query. </span><br />
<span style="font-weight:normal;"><a title="FOR XML" href="http://msdn.microsoft.com/en-us/library/ms178107.aspx">http://msdn.microsoft.com/en-us/library/ms178107.aspx</a> </span></p>
<h4>data() function</h4>
</div>
<div><span style="font-weight:normal;">If you want to get the value of an attribute, rather than the attribute node itself, we can use the data() method. </span></div>
<div>
<p class=" "><span style="font-weight:normal;">For ex: if you execute the following query, you will get the</span> <code>xml </code><span style="font-weight:normal;">output with</span> <code>&lt;ProjectCode&gt;</code> <span style="font-weight:normal;">attribute nodes.</span></p>
<pre class="brush: sql; title: ; notranslate">
SELECT ProjectCode
FROM @DeveloperProject c2
FOR XML PATH('')</pre>
<p><img title="XML PATH with Nodes" alt="XML PATH with Nodes" src="http://www.codeproject.com/KB/database/526912/attributewithcode.png" width="495" height="47" /><br />
<span style="font-weight:normal;">Now run it as follows, and see the result set. It gives the output without</span> <code>&lt;ProjectCode&gt;</code> <span style="font-weight:normal;">nodes.</span></p>
<pre class="brush: sql; title: ; notranslate">
SELECT ProjectCode AS 'data()'
FROM @DeveloperProject c2
FOR XML PATH('')</pre>
<p><img title="XML PATH without Nodes" alt="XML PATH without Nodes" src="http://www.codeproject.com/KB/database/526912/attributevaluewithoutnode.png" width="614" height="68" /></p>
<h3>Splitting delimited string</h3>
<p><span style="font-weight:normal;">Suppose we have a table called</span> <code>DeveloperProjectCSV </code><span style="font-weight:normal;">to store the developer id and comma separated project list</span></p>
<pre class="brush: sql; title: ; notranslate">
DECLARE @DeveloperProjectCSV Table(
    DeveoperID INT,
    ProjectCodes  VARCHAR(MAX)
)</pre>
<p><span style="font-weight:normal;">We can use previously created script to insert the data to this table. </span></p>
<pre class="brush: sql; title: ; notranslate">
INSERT INTO @DeveloperProjectCSV(DeveoperID,ProjectCodes)
SELECT DeveoperID,
    REPLACE((SELECT
        ProjectCode AS 'data()'
     FROM @DeveloperProject dp2
     WHERE dp2.DeveoperID = dp1.DeveoperID
     FOR XML PATH('')), ' ', ',') AS ProjectCodes
FROM @DeveloperProject dp1
GROUP BY DeveoperID
</pre>
<p><span style="font-size:10pt;font-family:'Courier New';line-height:115%;">Now the table contains following data</span></p>
<pre class="brush: plain; title: ; notranslate">
DeveoperID  ProjectCodes
----------- ------------------------------
1           CODE_PROJECT,MSFT,REPT_MOD
2           MSFT,CODE_PROJECT
3           REPT_MOD</pre>
<p><span style="font-weight:normal;">And we need to split the project codes for each developer. </span></p>
<pre class="brush: sql; title: ; notranslate">
;WITH cte AS (
    SELECT
        DeveoperID,
        CAST('' + REPLACE(ProjectCodes, ',', '') + '' AS XML) AS ProjectCodes
    FROM @DeveloperProjectCSV
)
SELECT
    DeveoperID,
    xTable.xColumn.value('.', 'VARCHAR(MAX)') AS ProjectCode
FROM cte
CROSS APPLY ProjectCodes.nodes('//r') AS xTable(xColumn)</pre>
<p><img title="Splited string" alt="Splited string" src="http://www.codeproject.com/KB/database/526912/splitted.JPG" width="214" height="139" /></p>
<h4>WITH (common_table_expression)</h4>
<p><span style="font-weight:normal;">WITH is used to specify the temporary named result set. In above WITH block creates temporary results set with two columns. One is a</span> <code>DeveloperID </code><span style="font-weight:normal;">and other one is an</span> <code>xml </code><span style="font-weight:normal;">type column for</span> <code>ProjectCodes</code><br />
<a style="font-weight:normal;" title="WITH clause" href="http://msdn.microsoft.com/en-us/library/ms175972.aspx">http://msdn.microsoft.com/en-us/library/ms175972.aspx</a></p>
<h4>nodes() Method</h4>
<p><span style="font-weight:normal;">The nodes() method is useful when you want to share an xml data type instance into relational data. It allows you to identify nodes that will be mapped into a new row.</span></p>
</div>
<div><strong><em>nodes (XQuery) as Table(Column)</em></strong></div>
<p><a href="http://msdn.microsoft.com/en-us/library/ms188282(v=sql.100).aspx">http://msdn.microsoft.com/en-us/library/ms188282(v=sql.100).aspx</a></p>
<div>
<h4>CROSS APPLY</h4>
<p><span style="font-weight:normal;">CROSS APPLY is just like an inner join query clause which allows joining between two table expressions.</span><br />
<span style="font-weight:normal;"><a title="Cross Apply" href="http://technet.microsoft.com/en-us/library/ms175156.aspx">http://technet.microsoft.com/en-us/library/ms175156.aspx</a> </span></p>
<hr />
<h3>Creating delimited strings with SQL 2000</h3>
<p>Since SQL 2000 doesn’t support <code>XML PATH</code>, above query doesn’t work with SQL 2000. As an alternative option we can use <code>COALESCE </code>or <code>ISNULL </code>function and create User Defined Function to get the concatenation output.<br />
Suppose we have a table called “<code>DeveloperProject</code>” with following data inserted.</p>
<pre class="brush: plain; title: ; notranslate">
DeveloperID ProjectCode
----------- --------------------
1           CODE_PROJECT
1           MSFT
1           REPT_MOD
2           MSFT
2           CODE_PROJECT
3           REPT_MOD</pre>
<p>First we have to create the concatenation function</p>
<pre class="brush: sql; title: ; notranslate">CREATE FUNCTION dbo.rowToCSV(@DeveoperID int )
RETURNS VARCHAR(MAX)
AS
BEGIN
    DECLARE @ProjectCodes VARCHAR(MAX)
    SELECT @ProjectCodes = COALESCE(@ProjectCodes + ', ', '') + ProjectCode
    FROM DeveloperProject
    WHERE DeveoperID = @DeveoperID
    RETURN @ProjectCodes
END</pre>
<p>By using the above function, you will can get the same output.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT
DeveoperID,
ProjectCodes = dbo.rowToCSV(DeveoperID )
FROM DeveloperProject
GROUP BY DeveoperID</pre>
<p><img title="Delimited String" alt="Delimited String" src="http://www.codeproject.com/KB/database/526912/delimitedresults.png" width="305" height="82" /></p>
<h4>COALESCE and ISNULL</h4>
<p class=" "><span style="font-weight:normal;"><code>COALESCE </code>returns the first nonnull expression among its arguments. This is just like <code>ISNULL </code>function in SQL. Both <code>ISNULL </code>and <code>COALESCE </code>can be used to get the same results but there are some differences. </span><a href="http://msdn.microsoft.com/en-us/library/ms190349(v=sql.90).aspx "><span style="font-weight:normal;">http://msdn.microsoft.com/en-us/library/ms190349(v=sql.90).aspx </span></a></p>
<p><span style="font-size:18px;color:#666666;">Splitting delimited string with SQL 2000</span><br />
Again, SQL 2000 doesn&#8217;t support <code>WITH </code>(Common table expression) and the APPLY operators. As an alternative option we can use the <code><strong>spt_values</strong></code> master table.</p>
<pre class="brush: sql; title: ; notranslate">SELECT  a.DeveloperID,
SUBSTRING(',' + a.ProjectCodes + ',', n.Number + 1, CHARINDEX(',', ',' + a.ProjectCodes + ',', n.Number + 1) - n.Number - 1) AS [Value]
FROM DeveloperProjects AS a
INNER JOIN master..spt_values AS n ON SUBSTRING(',' + a.ProjectCodes + ',', n.Number, 1) = ','
WHERE n.Type = 'p'
    AND n.Number &gt; 0
    AND n.Number &lt; LEN(',' + a.ProjectCodes + ',')</pre>
<h4>spt_values</h4>
<p>spt_values is an undocumented system table, which contains various data items used by Microsoft written stored procedures. We can use the rows with type = &#8216;P&#8217; to have a numbers table with the numbers from 1-2047.</p>
</div>
<p><span id="ArticleContent"></span><!-- End Article --></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=190&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/01/21/generating-and-splitting-a-delimited-string-column/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>

		<media:content url="http://www.codeproject.com/KB/database/526912/delimitedresults.png" medium="image">
			<media:title type="html">Table with delimited column</media:title>
		</media:content>

		<media:content url="http://www.codeproject.com/KB/database/526912/attributewithcode.png" medium="image">
			<media:title type="html">XML PATH with Nodes</media:title>
		</media:content>

		<media:content url="http://www.codeproject.com/KB/database/526912/attributevaluewithoutnode.png" medium="image">
			<media:title type="html">XML PATH without Nodes</media:title>
		</media:content>

		<media:content url="http://www.codeproject.com/KB/database/526912/splitted.JPG" medium="image">
			<media:title type="html">Splited string</media:title>
		</media:content>

		<media:content url="http://www.codeproject.com/KB/database/526912/delimitedresults.png" medium="image">
			<media:title type="html">Delimited String</media:title>
		</media:content>
	</item>
		<item>
		<title>HTML5 compatibility on mobile and tablet browsers</title>
		<link>http://tharakaweb.com/2013/01/19/html5-compatibility-on-mobile-and-tablet-browsers/</link>
		<comments>http://tharakaweb.com/2013/01/19/html5-compatibility-on-mobile-and-tablet-browsers/#comments</comments>
		<pubDate>Sat, 19 Jan 2013 14:21:44 +0000</pubDate>
		<dc:creator>Tharaka</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">https://tharakaweb.wordpress.com/?p=180</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=180&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a title="HTML 5 Compatibility" href="http://mobilehtml5.org/"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="HTML5 Compatibility" alt="HTML5 Compatibility" src="http://tharakaweb.files.wordpress.com/2013/01/image4.png?w=687&#038;h=340" width="687" height="340" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tharakaweb.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tharakaweb.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tharakaweb.com&#038;blog=27284272&#038;post=180&#038;subd=tharakaweb&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tharakaweb.com/2013/01/19/html5-compatibility-on-mobile-and-tablet-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/14453a0b47072d75be06d6a79fdd3860?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">tharakaweb</media:title>
		</media:content>

		<media:content url="http://tharakaweb.files.wordpress.com/2013/01/image4.png" medium="image">
			<media:title type="html">HTML5 Compatibility</media:title>
		</media:content>
	</item>
	</channel>
</rss>
