<?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>Fransiscus Setiawan</title>
	<atom:link href="http://fransiscuss.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fransiscuss.com</link>
	<description>My notepad of knowledge and my passion in development</description>
	<lastBuildDate>Thu, 01 Dec 2011 05:28:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='fransiscuss.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Fransiscus Setiawan</title>
		<link>http://fransiscuss.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://fransiscuss.com/osd.xml" title="Fransiscus Setiawan" />
	<atom:link rel='hub' href='http://fransiscuss.com/?pushpress=hub'/>
		<item>
		<title>WITH keyword in SQL Server</title>
		<link>http://fransiscuss.com/2011/12/01/with-keyword-in-sql-server/</link>
		<comments>http://fransiscuss.com/2011/12/01/with-keyword-in-sql-server/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 05:28:02 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/2011/12/01/with-keyword-in-sql-server/</guid>
		<description><![CDATA[Most people are using “WITH (NOLOCK)” instead of “ (NOLOCK)” and sometimes they asked you to put it “WITH” in front of it. But it is not necessary for the reason below WITH is not required for 2 reasons: 1. The following table hints are allowed with and without the WITH keyword: NOLOCK, READUNCOMMITTED, UPDLOCK, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=348&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>Most people are using “WITH (NOLOCK)” instead of “ (NOLOCK)” and sometimes they asked you to put it “WITH” in front of it. But it is not necessary for the reason below</pre>
<pre>WITH is not required for 2 reasons:</pre>
<pre>1. The following table hints are allowed with and without the WITH keyword: NOLOCK, READUNCOMMITTED, UPDLOCK, REPEATABLEREAD, SERIALIZABLE, READCOMMITTED, FASTFIRSTROW, TABLOCK, TABLOCKX, PAGLOCK, ROWLOCK, NOWAIT, READPAST, XLOCK, and NOEXPAND</pre>
<pre>2. &quot;WITH&quot; keyword is deprecated feature in the future SQL server</pre>
<pre>Omitting the WITH keyword is a deprecated feature and will be removed in a future version of Microsoft SQL Server. Always specify WITH in new development work, and modify applications that currently omit this keyword.</pre>
<pre>Link:</pre>
<pre><a href="http://msdn.microsoft.com/en-us/library/ms187373.aspx">http://msdn.microsoft.com/en-us/library/ms187373.aspx</a></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/348/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=348&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/12/01/with-keyword-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Delayed Script/Waiting in Javascript</title>
		<link>http://fransiscuss.com/2011/11/30/delayed-scriptwaiting-in-javascript/</link>
		<comments>http://fransiscuss.com/2011/11/30/delayed-scriptwaiting-in-javascript/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 02:55:22 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=346</guid>
		<description><![CDATA[I was struggling in finding out of how to make a simple delegate like in AJAX request through javascript. It takes me a few days to figure this out Basically the problems are: -I need to execute a piece code of javascript after getting the ticket from web service function -The webservice function might not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=346&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was struggling in finding out of how to make a simple delegate like in AJAX request through javascript. It takes me a few days to figure this out</p>
<p><strong>Basically the problems are:</strong></p>
<p>-I need to execute a piece code of javascript after getting the ticket from web service function</p>
<p>-The webservice function might not be responding to the first request because it waits for the state of the other external component</p>
<p>-The webservice will give the response when the external component is ready</p>
<p>-The client does not know when the external component is ready, neither the web service. But it wil be ready within 1-5 minutes which again depending external component</p>
<p><strong>Possible Solution:</strong></p>
<p>-Using the setTimeOut(function(){acquireTicket();}, 300000) will cause the application to wait for 5 mins before calling the web service , this approach will slowing down the user experience and waste of time because the external component can be ready earlier than 5 mins</p>
<p>-Using the while loop is not good because it makes the browser freezing while waiting and it will wasting the processing power because of the looping</p>
<p><strong>Recommended Solution:</strong></p>
<p>-Recall the function by itself using setTimeout Function using parameter to indicate whether it should go out of the loop or not</p>
<p>-The web service will be checked for every 2 seconds to check the response from the external component. Once the external component is ready then it will move on to execute the next line of code</p>
<p>-<a href="http://fransiscuss.files.wordpress.com/2011/11/image0015.png"><img src="http://fransiscuss.files.wordpress.com/2011/11/image0015.png?w=600&#038;h=755" alt="" title="image0015" width="600" height="755" class="alignnone size-full wp-image-347" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/346/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=346&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/30/delayed-scriptwaiting-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0015.png" medium="image">
			<media:title type="html">image0015</media:title>
		</media:content>
	</item>
		<item>
		<title>Access javascript object properties with invalid character</title>
		<link>http://fransiscuss.com/2011/11/17/access-javascript-object-properties-with-invalid-character/</link>
		<comments>http://fransiscuss.com/2011/11/17/access-javascript-object-properties-with-invalid-character/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 00:47:18 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=342</guid>
		<description><![CDATA[ParseJSON returning you an object from your AJAX Call, the problem that I have is my object properties has invalid character (e.g “#”) Assuming jsonData is my variable that contains the following information I’d like to grab the property of “#innerxml” Normally I can do this to get the property of an object but in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=342&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>ParseJSON returning you an object from your AJAX Call, the problem that I have is my object properties has invalid character (e.g “#”)</p>
<p>Assuming jsonData is my variable that contains the following information</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image0014.png"><img src="http://fransiscuss.files.wordpress.com/2011/11/image0014.png?w=600&#038;h=112" alt="" title="image0014" width="600" height="112" class="alignnone size-full wp-image-343" /></a></p>
<p>I’d like to grab the property of “#innerxml”</p>
<p>Normally I can do this to get the property of an object but in this case I can’t due to invalid character</p>
<p>(jQuery.parseJSON(jsonData)[0]).#innerxml</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image0022.png"><img src="http://fransiscuss.files.wordpress.com/2011/11/image0022.png?w=600&#038;h=127" alt="" title="image0022" width="600" height="127" class="alignnone size-full wp-image-344" /></a></p>
<p>So How do I access an object which has properties where one of the property name is using an invalid character (e.g “#”)</p>
<p>I can access with the following style</p>
<p>(jQuery.parseJSON(jsonData)[0])['#innerxml']</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image0032.png"><img src="http://fransiscuss.files.wordpress.com/2011/11/image0032.png?w=600&#038;h=75" alt="" title="image0032" width="600" height="75" class="alignnone size-full wp-image-345" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/342/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=342&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/17/access-javascript-object-properties-with-invalid-character/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0014.png" medium="image">
			<media:title type="html">image0014</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0022.png" medium="image">
			<media:title type="html">image0022</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0032.png" medium="image">
			<media:title type="html">image0032</media:title>
		</media:content>
	</item>
		<item>
		<title>Umbraco Installation in Shared Web Hosting</title>
		<link>http://fransiscuss.com/2011/11/13/umbraco-installation-in-shared-web-hosting/</link>
		<comments>http://fransiscuss.com/2011/11/13/umbraco-installation-in-shared-web-hosting/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 21:51:50 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/2011/11/13/umbraco-installation-in-shared-web-hosting/</guid>
		<description><![CDATA[I tried to install umbraco in shared webhosting from the control panel but instead the error that I’m getting is The application could not be installed: Error occured in Web App Gallery module From my research it seems that there is an error in the Web App Gallery module, some article it says that the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=340&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>I tried to install umbraco in shared webhosting from the control panel but instead the error that I’m getting is</em></p>
<p><em><strong>The application could not be installed: Error occured in Web App Gallery module</strong></em></p>
<p>From my research it seems that there is an error in the Web App Gallery module, some article it says that the Web App Gallery module is out of date. But this is shared web hosting so there is nothing much I can do to fix this. So how to install umbraco manually?</p>
<p>1. Create a blank DB in your SQL Server 2008 for your Umbraco</p>
<p>2. Create a SQL User for the Umbraco DB in the step 1</p>
<p>3. Download umbraco from <a href="http://umbraco.codeplex.com/">http://umbraco.codeplex.com</a></p>
<p>4. Extract the content to the downloaded package to the root of your domain wwwroot folder via FTP</p>
<p>5. Make sure the default website is already created</p>
<p>6. Make sure the .NET framework is being set to .NET 4.0 (Integrated)</p>
<p>7. Run the installation through <a href="http://www.yourdomain.com/install/default.aspx">www.yourdomain.com/install/default.aspx</a></p>
<p>8. Follow the steps, it will ask you the database name and the database user along the way</p>
<p>9. Once the installation finished, please make sure you delete the install folder for security purpose</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/340/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=340&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/13/umbraco-installation-in-shared-web-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Cleanup File name from invalid characters</title>
		<link>http://fransiscuss.com/2011/11/09/cleanup-file-path-from-invalid-characters/</link>
		<comments>http://fransiscuss.com/2011/11/09/cleanup-file-path-from-invalid-characters/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 23:06:55 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=332</guid>
		<description><![CDATA[I have a function that is used to save a file base on the user input (basically the user can type whichever filename and whichever path) and the code is not handling the invalid filename or path hence what it does is just throwing .NET general exception like below To fix it I created a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=332&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a function that is used to save a file base on the user input (basically the user can type whichever filename and whichever path) and the code is not handling the invalid filename or path hence what it does is just throwing .NET general exception like below</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image0013.png"><img class="alignnone size-full wp-image-333" title="image0013" src="http://fransiscuss.files.wordpress.com/2011/11/image0013.png?w=600" alt=""   /></a></p>
<p>To fix it I created a new function that basically get the invalid path characters and invalid filename characters from the system and remove invalid character in the input (file name). By doing this the user does not need to replace the character.</p>
<p>If you use Path.GetFileName it will actually remove the illegal character automatically but the way it removes the illegal character is so aggressive</p>
<p>e.g Path.GetFileName(&#8220;c:\workflow\Clearance:Photo ID Badge:Access abc-123.ist&#8221;) will return Access abc-123.ist</p>
<p>Well this problem itself will give different argument like why do we let people put the garbage character in?and why don’t we give the validation?or the other argument is “why do we need to change the input from the user without letting them knowing it?</p>
<div>
<p>  236    &#8221;&#8217; &lt;summary&gt;</p>
<p>237     &#8221;&#8217; this function is used to clean up invalid/illegal characters from filename and replace it with blank</p>
<p>238     &#8221;&#8217; &lt;/summary&gt;</p>
<p>239     &#8221;&#8217; &lt;param name=&#8221;FileName&#8221;&gt;&lt;/param&gt;</p>
<p>240     &#8221;&#8217; &lt;returns&gt;&lt;/returns&gt;</p>
<p>241     &#8221;&#8217; &lt;remarks&gt;&lt;/remarks&gt;</p>
<p>242     Private Function CleanFileName(ByVal FileName As String) As String</p>
<p>243         Dim invalid As String = New String(Path.GetInvalidFileNameChars()) + New String(Path.GetInvalidPathChars())</p>
<p>244         Dim originalPath As String = FileName.Substring(0, FileName.LastIndexOf(&#8220;\&#8221;) + 1)</p>
<p>245         FileName = FileName.Substring(FileName.LastIndexOf(&#8220;\&#8221;))</p>
<p>246</p>
<p>247         For Each c As Char In invalid</p>
<p>248             FileName = FileName.Replace(c.ToString(), &#8220;&#8221;)</p>
<p>249         Next</p>
<p>250</p>
<p>251         &#8216;readd the path</p>
<p>252         FileName = originalPath + FileName</p>
<p>253</p>
<p>254         Return FileName</p>
<p>255     End Function</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/332/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=332&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/09/cleanup-file-path-from-invalid-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0013.png" medium="image">
			<media:title type="html">image0013</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Service Tester</title>
		<link>http://fransiscuss.com/2011/11/09/web-service-tester/</link>
		<comments>http://fransiscuss.com/2011/11/09/web-service-tester/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 21:27:46 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=327</guid>
		<description><![CDATA[This is an application to access your Web Service/API without worrying to create your own client application for the sake of testing. Personally, I’m using soapUI (an open source application to test web service) http://sourceforge.net/projects/soapui/files/ I’d prefer to use tool this because it provides you a transparent communication between the client and the Web Service [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=327&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is an application to access your Web Service/API without worrying to create your own client application for the sake of testing. Personally, I’m using soapUI (an open source application to test web service)</p>
<p><a href="http://sourceforge.net/projects/soapui/files/">http://sourceforge.net/projects/soapui/files/</a></p>
<p>I’d prefer to use tool this because it provides you a transparent communication between the client and the Web Service and it’s really simple to use and configure. It’d save you a lot of time to debug the issue for your client. You can trace it down whether the issue is in the client or in the web service itself</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image0012.png"><img class="alignnone size-full wp-image-328" title="image0012" src="http://fransiscuss.files.wordpress.com/2011/11/image0012.png?w=600&#038;h=465" alt="" width="600" height="465" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=327&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/09/web-service-tester/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0012.png" medium="image">
			<media:title type="html">image0012</media:title>
		</media:content>
	</item>
		<item>
		<title>Profiling CLR for .NET application</title>
		<link>http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/</link>
		<comments>http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 00:07:56 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=319</guid>
		<description><![CDATA[CLR Profiler can be used to analyse how your object is allocated in memory and which object has taken the most memory. It also can be used to detect memory leak To download CLR profiler for .NET 2.0 please visit http://www.microsoft.com/download/en/details.aspx?id=13382 , there is another version for .NET framework 1.1 -Extract the file into your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=319&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>CLR Profiler can be used to analyse how your object is allocated in memory and which object has taken the most memory. It also can be used to detect memory leak</p>
<p>To download CLR profiler for .NET 2.0 please visit <a href="http://www.microsoft.com/download/en/details.aspx?id=13382">http://www.microsoft.com/download/en/details.aspx?id=13382</a> , there is another version for .NET framework 1.1</p>
<p>-Extract the file into your desired location</p>
<p>-you also need to run “regsvr32 ProfilerOBJ.dll” otherwise you will get dialog message that mentioned it’s waiting for the CLR and you will not get any result</p>
<p>- Run the CLRProfiler.exe in Binariesx86 if your app is 32 bit and Binariesx64 if your app is 64 bit</p>
<p><strong>For profiling windows app, you can do the following steps:</strong></p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image0011.png"><img src="http://fransiscuss.files.wordpress.com/2011/11/image0011.png?w=600" alt="" title="image0011"   class="alignnone size-full wp-image-320" /></a></p>
<p>1. Select the exe file</p>
<p>2. Do stuff/interact with your application</p>
<p>3. Once you are finished then you can close your application or select “Kill Application”</p>
<p>4. Upon completion it will give you the screen below</p>
<p><strong>For profiling ASP.NET app, you can do the following steps:</strong></p>
<p>1. Select Profile ASP.NET from file menu</p>
<p>2. It will restart your IIS with the necessary trace</p>
<p>3. Select “Start ASP.NET”</p>
<p>4. Once you are finished then select “Kill ASP.NET”</p>
<p>5. It will restart the IIS and remove the trace added before</p>
<p>6. Upon completion it will give you the screen below</p>
<p><strong>*You can use this for service as well – </strong></p>

<a href='http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/image0021/' title='image0021'><img data-attachment-id='321' data-orig-size='340,182' data-liked='0'width="150" height="80" src="http://fransiscuss.files.wordpress.com/2011/11/image0021.png?w=150&#038;h=80" class="attachment-thumbnail" alt="image0021" title="image0021" /></a>
<a href='http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/image0031/' title='image0031'><img data-attachment-id='322' data-orig-size='844,466' data-liked='0'width="150" height="82" src="http://fransiscuss.files.wordpress.com/2011/11/image0031.png?w=150&#038;h=82" class="attachment-thumbnail" alt="image0031" title="image0031" /></a>
<a href='http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/image0041/' title='image0041'><img data-attachment-id='323' data-orig-size='1000,610' data-liked='0'width="150" height="91" src="http://fransiscuss.files.wordpress.com/2011/11/image0041.png?w=150&#038;h=91" class="attachment-thumbnail" alt="image0041" title="image0041" /></a>
<a href='http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/image007/' title='image007'><img data-attachment-id='326' data-orig-size='352,163' data-liked='0'width="150" height="69" src="http://fransiscuss.files.wordpress.com/2011/11/image007.png?w=150&#038;h=69" class="attachment-thumbnail" alt="image007" title="image007" /></a>

<p>This is the information for GC</p>

<a href='http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/image0051/' title='image0051'><img data-attachment-id='324' data-orig-size='983,596' data-liked='0'width="150" height="90" src="http://fransiscuss.files.wordpress.com/2011/11/image0051.png?w=150&#038;h=90" class="attachment-thumbnail" alt="image0051" title="image0051" /></a>
<a href='http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/image0061/' title='image0061'><img data-attachment-id='325' data-orig-size='1021,429' data-liked='0'width="150" height="63" src="http://fransiscuss.files.wordpress.com/2011/11/image0061.png?w=150&#038;h=63" class="attachment-thumbnail" alt="image0061" title="image0061" /></a>

<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/319/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=319&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/09/profiling-clr-for-net-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0011.png" medium="image">
			<media:title type="html">image0011</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0021.png?w=150" medium="image">
			<media:title type="html">image0021</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0031.png?w=150" medium="image">
			<media:title type="html">image0031</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0041.png?w=150" medium="image">
			<media:title type="html">image0041</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image007.png?w=150" medium="image">
			<media:title type="html">image007</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0051.png?w=150" medium="image">
			<media:title type="html">image0051</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image0061.png?w=150" medium="image">
			<media:title type="html">image0061</media:title>
		</media:content>
	</item>
		<item>
		<title>Remapping svc extension in IIS 7 extension handlers</title>
		<link>http://fransiscuss.com/2011/11/08/remapping-svc-extension-in-iis-7-extension-handlers/</link>
		<comments>http://fransiscuss.com/2011/11/08/remapping-svc-extension-in-iis-7-extension-handlers/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 03:55:45 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/2011/11/08/remapping-svc-extension-in-iis-7-extension-handlers/</guid>
		<description><![CDATA[If you open your WCF/ svc file in your localhost through browser and it just display blank page then what might happen is you don’t have handler associated with svc extension To verify it, go to your IIS and go to IIS Handler Mappings and try to find an svc extension entry, but if you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=316&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you open your WCF/ svc file in your localhost through browser and it just display blank page then what might happen is you don’t have handler associated with svc extension</p>
<p>To verify it, go to your IIS and go to IIS Handler Mappings and try to find an svc extension entry, but if you couldn’t find extension SVC exists on the list, then you can remap/re-add the svc extension by running</p>
<p><strong>C:\Windows\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation\ServiceModelReg.exe –i</strong></p>
<p>*if you are still using 32 bit then you just need to replace Framework64 with Framework</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=316&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/08/remapping-svc-extension-in-iis-7-extension-handlers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Statistical information &#8211; Index usage, etc and also tips on how to find the most costly SQL Server queries using DMV&#8217;s</title>
		<link>http://fransiscuss.com/2011/11/07/sql-statistical-information-index-usage-etc-and-also-tips-on-how-to-find-the-most-costly-sql-server-queries-using-dmvs/</link>
		<comments>http://fransiscuss.com/2011/11/07/sql-statistical-information-index-usage-etc-and-also-tips-on-how-to-find-the-most-costly-sql-server-queries-using-dmvs/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 02:49:06 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=309</guid>
		<description><![CDATA[This is just an information for the users that might not know this feature in SQL Server Management Studio, eventhough I’m sure most of people should have known this feature Basically SQL Server stores all the database usage information including index usage, disk usage, top transaction etc. *This information is not available from the backup [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=309&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is just an information for the users that might not know this feature in SQL Server Management Studio, eventhough I’m sure most of people should have known this feature</p>
<p>Basically SQL Server stores all the database usage information including index usage, disk usage, top transaction etc. *This information is not available from the backup file</p>
<p>1. Right click your database, Go to Reports, Go to Standard Reports and you can find all the out of the box reports</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image003.png"><img class="alignnone size-full wp-image-312" title="image003" src="http://fransiscuss.files.wordpress.com/2011/11/image003.png?w=600&#038;h=479" alt="" width="600" height="479" /></a></p>
<p>Clicking one of the report will give you detailed information – in this sample, I’m using Index Usage Statistics</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image006.png"><img class="alignnone size-full wp-image-313" title="image006" src="http://fransiscuss.files.wordpress.com/2011/11/image006.png?w=600&#038;h=610" alt="" width="600" height="610" /></a></p>
<p>How to find the top 20 most expensive queries by the total execution time, run this query against the database</p>
<pre><code>SELECT</code> <code>TOP</code> <code>20</code>
<code> qs.sql_handle,</code>
<code> qs.execution_count,</code>
<code> qs.total_worker_time AS</code> <code>Total_CPU,</code>
<code> total_CPU_inSeconds = --Converted from microseconds</code>
<code> qs.total_worker_time/1000000,</code>
<code> average_CPU_inSeconds = --Converted from microseconds</code>
<code> (qs.total_worker_time/1000000) / qs.execution_count,</code>
<code> qs.total_elapsed_time,</code>
<code> total_elapsed_time_inSeconds = --Converted from microseconds</code>
<code> qs.total_elapsed_time/1000000,</code>
<code> st.text,</code>
<code> qp.query_plan</code>
<code>FROM</code>
<code> sys.dm_exec_query_stats AS</code> <code>qs</code>
<code> CROSS</code> <code>APPLY sys.dm_exec_sql_text(qs.sql_handle) AS</code> <code>st</code>
<code> CROSS</code> <code>apply sys.dm_exec_query_plan (qs.plan_handle) AS</code> <code>qp</code>
<code>ORDER</code> <code>BY</code> <code>qs.total_worker_time DESC</code></pre>
<p>-It will give you this result set</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image004.png"><img class="alignnone size-full wp-image-310" title="image004" src="http://fransiscuss.files.wordpress.com/2011/11/image004.png?w=600&#038;h=196" alt="" width="600" height="196" /></a></p>
<p>- Clicking the query_plan will give you detailed query plan</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image005.png"><img class="alignnone size-full wp-image-311" title="image005" src="http://fransiscuss.files.wordpress.com/2011/11/image005.png?w=600&#038;h=441" alt="" width="600" height="441" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/309/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=309&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/07/sql-statistical-information-index-usage-etc-and-also-tips-on-how-to-find-the-most-costly-sql-server-queries-using-dmvs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image003.png" medium="image">
			<media:title type="html">image003</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image006.png" medium="image">
			<media:title type="html">image006</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image004.png" medium="image">
			<media:title type="html">image004</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image005.png" medium="image">
			<media:title type="html">image005</media:title>
		</media:content>
	</item>
		<item>
		<title>Usage of Pivot in SQL Server</title>
		<link>http://fransiscuss.com/2011/11/07/usage-of-pivot-in-sql-server/</link>
		<comments>http://fransiscuss.com/2011/11/07/usage-of-pivot-in-sql-server/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 02:39:40 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=303</guid>
		<description><![CDATA[The usage of PIVOT keyword In SQL Server we can transform a horizontal rows to be vertically represented by using Pivot Keyword Run this query to have sample data CREATE TABLE OrderItems(Order_No INT, ProductName VARCHAR(255), TotalQty INT) GO INSERT INTO OrderItems(Order_No, ProductName, TotalQty) VALUES (112, &#8216;Sprite&#8217;, 5) GO INSERT INTO OrderItems(Order_No, ProductName, TotalQty) VALUES (112, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=303&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The usage of PIVOT keyword</p>
<p>In SQL Server we can transform a horizontal rows to be vertically represented by using Pivot Keyword</p>
<p>Run this query to have sample data</p>
<p>CREATE TABLE OrderItems(Order_No INT, ProductName VARCHAR(255), TotalQty INT)</p>
<p>GO</p>
<p>INSERT INTO OrderItems(Order_No, ProductName, TotalQty)</p>
<p>VALUES (112, &#8216;Sprite&#8217;, 5)</p>
<p>GO</p>
<p>INSERT INTO OrderItems(Order_No, ProductName, TotalQty)</p>
<p>VALUES (112, &#8216;Coke&#8217;, 7)</p>
<p>GO</p>
<p>INSERT INTO OrderItems(Order_No, ProductName, TotalQty)</p>
<p>VALUES (112, &#8216;Lemonade&#8217;, 2)</p>
<p>GO</p>
<p>INSERT INTO OrderItems(Order_No, ProductName, TotalQty)</p>
<p>VALUES (113, &#8216;Apple Juice&#8217;, 8 )</p>
<p>GO</p>
<p>INSERT INTO OrderItems(Order_No, ProductName, TotalQty)</p>
<p>VALUES (113, &#8216;Diet Coke&#8217;, 2)</p>
<p>GO</p>
<p>INSERT INTO OrderItems(Order_No, ProductName, TotalQty)</p>
<p>VALUES (114, &#8216;Coke&#8217;, 15)</p>
<p>GO</p>
<p>INSERT INTO OrderItems(Order_No, ProductName, TotalQty)</p>
<p>VALUES (114, &#8216;Lemonade&#8217;, 13)</p>
<p>GO</p>
<p>Running simple select from OrderItems will give you this table</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image001.png"><img class="alignnone size-full wp-image-304" title="image001" src="http://fransiscuss.files.wordpress.com/2011/11/image001.png?w=600" alt=""   /></a></p>
<p>Now we want to look it statistically – maybe for reporting purpose. Run the query below</p>
<p>SELECT Order_No, Sprite, Coke, Lemonade, [Apple Juice], [Diet Coke]</p>
<p>FROM (</p>
<p>SELECT Order_No, ProductName, TotalQty</p>
<p>FROM OrderItems) ItemList</p>
<p>PIVOT (SUM(TotalQty) FOR ProductName IN (Sprite, Coke, Lemonade, [Apple Juice], [Diet Coke])) AS PivotResult</p>
<p>ORDER BY Order_No</p>
<p>GO</p>
<p>It will give you this result set</p>
<p><a href="http://fransiscuss.files.wordpress.com/2011/11/image002.png"><img class="alignnone size-full wp-image-305" title="image002" src="http://fransiscuss.files.wordpress.com/2011/11/image002.png?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/303/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&amp;blog=26182965&amp;post=303&amp;subd=fransiscuss&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2011/11/07/usage-of-pivot-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image001.png" medium="image">
			<media:title type="html">image001</media:title>
		</media:content>

		<media:content url="http://fransiscuss.files.wordpress.com/2011/11/image002.png" medium="image">
			<media:title type="html">image002</media:title>
		</media:content>
	</item>
	</channel>
</rss>
