<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1.3" -->
<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/"
	>

<channel>
	<title>Amit's Blog...</title>
	<link>http://amit.myktm.com</link>
	<description>On Life, Technology and 'More'...</description>
	<pubDate>Mon, 23 Mar 2009 04:28:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>
	<language>en</language>
			<item>
		<title>test</title>
		<link>http://amit.myktm.com/test/</link>
		<comments>http://amit.myktm.com/test/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 04:17:21 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[The Usual]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/test/</guid>
		<description><![CDATA[







]]></description>
			<content:encoded><![CDATA[<object width="400" height="323" bgcolor="#111111" data="http://www.trafficgeyser.net/flash/videoplayer.swf" type="application/x-shockwave-flash">
<param name="movie" value="http://www.trafficgeyser.net/flash/videoplayer.swf">
<param name="allowfullscreen" value="true">
<param name="scale" value="noscale">
<param name="bgcolor" value="#111111">
<param name="allowscriptaccess" value="always">
<param name="allownetworking" value="all">
<param name="flashvars" value='config={"embedded":true,"menuItems":[true,true,true,true,true,false,false],"baseURL":"http://www.trafficgeyser.net/flash","videoFile":"http://www.trafficgeyser.net/getvideosecure/o4feqk735e6bc379c92155cd95c9688cb7a495t5jJb","initialScale":"scale","controlBarBackgroundColor":"0x333333","autoBuffering":false,"loop":false,"autoPlay":false}' /></object>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/test/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Practice.</title>
		<link>http://amit.myktm.com/practice/</link>
		<comments>http://amit.myktm.com/practice/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 16:35:31 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[Quotes]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/practice/</guid>
		<description><![CDATA[The more I practice, the luckier I get.
]]></description>
			<content:encoded><![CDATA[<p>The more I practice, the luckier I get.</p>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/practice/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SQL Concatenate rows from same column</title>
		<link>http://amit.myktm.com/sql-concatenate-rows-from-same-column/</link>
		<comments>http://amit.myktm.com/sql-concatenate-rows-from-same-column/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 20:21:46 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/sql-concatenate-rows-from-same-column/</guid>
		<description><![CDATA[The other day when I was helping my friend with an assignment I came across a very interesting query. Most of us might have used the SQL Concat function to concatenate from two columns in a row. That is pretty easy for eg.
SELECT CONCAT(firstname, ‘ ‘, secondname) FROM profiles;

The above SQL Statement is very easy [...]]]></description>
			<content:encoded><![CDATA[<p>The other day when I was helping my friend with an assignment I came across a very interesting query. Most of us might have used the SQL Concat function to concatenate from two columns in a row. That is pretty easy for eg.</p>
<p><code>SELECT CONCAT(firstname, ‘ ‘, secondname) FROM profiles;<br />
</code></p>
<p>The above SQL Statement is very easy and self explanatory.</p>
<p>Now, how would you write a query (or queries) where you want to <strong>concatenate elements from the same column from all the rows</strong> that have been selected? For example if you would want a list all the usernames in the table separated by a comma:</p>
<p><code>SET @usernames = “”;<br />
--Initialize the variable usernames with an empty string.<br />
SELECT @usernames := CONCAT(@usernames, “, “, username) FROM profiles;<br />
-- Here all the usernames are concatenated to the usernames variable.<br />
-- This is not our output as this will give us multiple rows, with the last row having all the usernames.<br />
SET @usernames = SUBSTRING(@ids FROM 2);<br />
-- Cleaning up the list by removing the comma at the beginning.<br />
SELECT @usernames;<br />
</code></p>
<p>The above set of queries will get you all the usernames separated by comma.</p>
<p>This also solved one of my other problems that I was not able to solve earlier with mySQL. How would you write a query where you could have a column with Serial Number for the records? If you take a look at the above solution, this is very easy.</p>
<p><code>SET @sno = 0;<br />
SELECT @sno := @sno+1 as SNO, username FROM profiles;<br />
</code></p>
<p>This will give you a list of usernames with Serial Numbers as a separate column.</p>
<p>Hope it was worthwhile reading the above <img src='http://amit.myktm.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/sql-concatenate-rows-from-same-column/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Glorious Fullmoon</title>
		<link>http://amit.myktm.com/glorious-fullmoon/</link>
		<comments>http://amit.myktm.com/glorious-fullmoon/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 17:29:40 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[Interesting]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/glorious-fullmoon/</guid>
		<description><![CDATA[If you were able to see the moon on 25th / 26th Oct 2007, you should consider yourself lucky. It is the largest full moon of the century as it reaches perigee – the closes point in its elliptical orbit. On April 3 in the current year itself the full moon appeared within hours of [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://amit.myktm.com/wp-content/uploads/2007/10/apogeeperigee2006_ayiomamitis.jpg' title='Glorius Fullmoon'><img src='http://amit.myktm.com/wp-content/uploads/2007/10/apogeeperigee2006_ayiomamitis.thumbnail.jpg' alt='Glorius Fullmoon' align='left' hspace='7' /></a>If you were able to see the moon on 25th / 26th Oct 2007, you should consider yourself lucky. It is the largest full moon of the century as it reaches perigee – the closes point in its elliptical orbit. On April 3 in the current year itself the full moon appeared within hours of Apogee – the farthest point in the lunar orbit, making it the smallest full moon of the year.</p>
<p>It is very difficult to notice the increase in the size but when I checked out it sure seemed very bright (maybe it was just the full moon effect <img src='http://amit.myktm.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). Anyways, I thought it was something worth remembering.</p>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/glorious-fullmoon/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Results! Results!! Results!!!</title>
		<link>http://amit.myktm.com/results-results-results/</link>
		<comments>http://amit.myktm.com/results-results-results/#comments</comments>
		<pubDate>Mon, 27 Aug 2007 16:06:11 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[The Usual]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/results-results-results/</guid>
		<description><![CDATA[The final year engineering students from Pune University have been expecting there results now for two weeks. After waiting everyday and spending days in expectations finally, PU declares our result!
I was at office when I got message from a friend informing me that the results will be out at 5. After that, as expected I [...]]]></description>
			<content:encoded><![CDATA[<p>The final year engineering students from Pune University have been expecting there results now for two weeks. After waiting everyday and spending days in expectations finally, PU declares our result!</p>
<p>I was at office when I got message from a friend informing me that the results will be out at 5. After that, as expected I could hardly concentrate on work and hence went back home early. But then again, <strong>as expected</strong> the results were not declared on time. By the time they declared the result it was 8 and before I could get a call from my friend who was supposed to tell me about my result, I found it out on the PU site and it was First Class. Really wanted to know my marks but they did not show.</p>
<p>Thanks darling for all the motivation! <img src='http://amit.myktm.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Thanks to everyone who were with me and wished all the luck to me throughout.</p>
<p>P.S. : Finally showed the result next day.. Distinction in the final sem, first class over all.. more than expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/results-results-results/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Started Work</title>
		<link>http://amit.myktm.com/started-work/</link>
		<comments>http://amit.myktm.com/started-work/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 16:01:15 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[The Usual]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/started-work/</guid>
		<description><![CDATA[Today was my first day at work [HWB Nepal]. Got a little orientation session but the rest of the day was rather vapid, did not have much to do. Hope its going to be worth it and I have a nice experience there.
]]></description>
			<content:encoded><![CDATA[<p>Today was my first day at work [<a href="http://www.hwbnepal.com">HWB Nepal</a>]. Got a little orientation session but the rest of the day was rather vapid, did not have much to do. Hope its going to be worth it and I have a nice experience there.</p>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/started-work/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Strength</title>
		<link>http://amit.myktm.com/strength/</link>
		<comments>http://amit.myktm.com/strength/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 17:19:56 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[Quotes]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/strength/</guid>
		<description><![CDATA[An object is only as strong as its weakest point.
]]></description>
			<content:encoded><![CDATA[<blockquote><p>An object is only as strong as its weakest point.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/strength/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Opportunities</title>
		<link>http://amit.myktm.com/opportunities/</link>
		<comments>http://amit.myktm.com/opportunities/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 17:18:42 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[Quotes]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/opportunities/</guid>
		<description><![CDATA[Opportunities seem more valuable to us when their availability is limited
]]></description>
			<content:encoded><![CDATA[<blockquote><p>Opportunities seem more valuable to us when their availability is limited</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/opportunities/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dreams</title>
		<link>http://amit.myktm.com/dreams/</link>
		<comments>http://amit.myktm.com/dreams/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 17:17:43 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[Quotes]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/dreams/</guid>
		<description><![CDATA[The old dreams were good dreams; they didn’t work out, but I am glad I had them.
]]></description>
			<content:encoded><![CDATA[<blockquote><p>The old dreams were good dreams; they didn’t work out, but I am glad I had them.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/dreams/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Amidst Exams</title>
		<link>http://amit.myktm.com/amidst-exams/</link>
		<comments>http://amit.myktm.com/amidst-exams/#comments</comments>
		<pubDate>Sat, 09 Jun 2007 21:24:44 +0000</pubDate>
		<dc:creator>Amit Chaudhary</dc:creator>
		
		<category><![CDATA[The Usual]]></category>

		<guid isPermaLink="false">http://amit.myktm.com/amidst-exams/</guid>
		<description><![CDATA[Yes, this is the reason why I have been away from the blog. Or is it? I really do not have anything to write about right now. These past few weeks have been pretty boring as I have not been able to take up any work because I SHOULD BE ‘studying’ and hence I have [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, this is the reason why I have been away from the blog. Or is it? I really do not have anything to write about right now. These past few weeks have been pretty boring as I have not been able to take up any work because I SHOULD BE ‘studying’ and hence I have following this very boring routine (not that my routine otherwise is totally FUN, but still)! For those who know me well are aware that I cannot study until the exam’s right round the corner. I might open my book here and there and sit around it for hours, but all this in vein. I am just waiting my time. Who am I kidding? I just cannot concentrate until the exams are right on my head.</p>
<p>As with everyone during exams, everything on TV seems to be interesting; all blog posts made by bloggers you don’t even know seems to be very interesting; you want to watch more movies, go out for dinner and what not! Why can’t I just concentrate on exams just like some other people do?</p>
<p>Anyways, that’s the way it is. Just gave two (Network and Information Security.. and Software Testing and Quality Assurance.. both very interesting subjects but at the sametime with the exam pattern that we have there were a lot of things to mug up because of which I ended up hating both of them) exams this week and looking forward to finishing up by giving two more (Distributed System ..and Advanced Computer Architecture.. We had covered a bit of DS, thanx to the oral exams! But I have no clue about about ACA.. we do have a week&#8217;s leave for that so it should be OK) in the couple of weeks ahead. The two exams that I have given so far this semester have gone good and I have tried to put in an extra effort to improve my ‘acads’ which suck! Only time will tell if the effort was worth it. </p>
<p>For anyone who reads this WISH ME LUCK! <img src='http://amit.myktm.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amit.myktm.com/amidst-exams/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
