<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Update Multiple Rows With Different Values and a Single SQL Query</title>
	<atom:link href="http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/</link>
	<description>Web development, programming and I.T.</description>
	<lastBuildDate>Wed, 01 Feb 2012 11:39:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jocsism</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-28247</link>
		<dc:creator>Jocsism</dc:creator>
		<pubDate>Mon, 16 Jan 2012 20:43:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-28247</guid>
		<description>Good one sir this is what i&#039;m looking for thanks! sir is it possible to use column increments like display_order=display_order+1 based on your example, because in my case im trying to update the quantity of the inventory based on their status. like for example i updated a certain item to status &#039;InStock&#039; i would also like my table inventory column &#039;InStock&#039; value to increment . i would appreciate it very much if you email me regarding this question. thank you.</description>
		<content:encoded><![CDATA[<p>Good one sir this is what i&#8217;m looking for thanks! sir is it possible to use column increments like display_order=display_order+1 based on your example, because in my case im trying to update the quantity of the inventory based on their status. like for example i updated a certain item to status &#8216;InStock&#8217; i would also like my table inventory column &#8216;InStock&#8217; value to increment . i would appreciate it very much if you email me regarding this question. thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Efficient Update SQL, updating multiple rows with one SQL statement, Avoiding Loops &#124; DIGG LINK</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-27870</link>
		<dc:creator>Efficient Update SQL, updating multiple rows with one SQL statement, Avoiding Loops &#124; DIGG LINK</dc:creator>
		<pubDate>Mon, 09 Jan 2012 11:18:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-27870</guid>
		<description>[...] http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query... [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query.." rel="nofollow">http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query..</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep Kumar Sharma (http://www.techtt.org)</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-26826</link>
		<dc:creator>Pradeep Kumar Sharma (http://www.techtt.org)</dc:creator>
		<pubDate>Fri, 23 Dec 2011 07:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-26826</guid>
		<description>it should be like

 UPDATE empsal SET sal =
    CASE WHEN sal BETWEEN 100 AND 500 THEN sal + 5000
    WHEN sal BETWEEN 40000 AND 55000 THEN sal + 7000
   else sal

    END</description>
		<content:encoded><![CDATA[<p>it should be like</p>
<p> UPDATE empsal SET sal =<br />
    CASE WHEN sal BETWEEN 100 AND 500 THEN sal + 5000<br />
    WHEN sal BETWEEN 40000 AND 55000 THEN sal + 7000<br />
   else sal</p>
<p>    END</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eilo</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-26659</link>
		<dc:creator>Eilo</dc:creator>
		<pubDate>Wed, 21 Dec 2011 04:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-26659</guid>
		<description>This was the most amazing tip on sql ever!!

I was able to solve a 2963 + 1520 duplicated rows (from 2 different dbs) with a single query..... obviously i made a table_copy and use the same method to achieve the goal.

UPDATE characters AS t, (SELECT `guid`,`name` FROM `characters_copy` GROUP BY `name` HAVING COUNT(`name`)=2) AS n SET t.`name`=CONCAT(t.`name`,&#039;aaa&#039;) WHERE t.guid=n.guid;

Thank you so much!</description>
		<content:encoded><![CDATA[<p>This was the most amazing tip on sql ever!!</p>
<p>I was able to solve a 2963 + 1520 duplicated rows (from 2 different dbs) with a single query&#8230;.. obviously i made a table_copy and use the same method to achieve the goal.</p>
<p>UPDATE characters AS t, (SELECT `guid`,`name` FROM `characters_copy` GROUP BY `name` HAVING COUNT(`name`)=2) AS n SET t.`name`=CONCAT(t.`name`,&#8217;aaa&#8217;) WHERE t.guid=n.guid;</p>
<p>Thank you so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: premkumar</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-25779</link>
		<dc:creator>premkumar</dc:creator>
		<pubDate>Fri, 09 Dec 2011 15:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-25779</guid>
		<description>thank you its very useful for me and my friends</description>
		<content:encoded><![CDATA[<p>thank you its very useful for me and my friends</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajnikant</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-25759</link>
		<dc:creator>rajnikant</dc:creator>
		<pubDate>Fri, 09 Dec 2011 11:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-25759</guid>
		<description>Thank you..!</description>
		<content:encoded><![CDATA[<p>Thank you..!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Habib</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-25492</link>
		<dc:creator>Habib</dc:creator>
		<pubDate>Tue, 06 Dec 2011 09:29:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-25492</guid>
		<description>Good........... Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Good&#8230;&#8230;&#8230;.. Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Update Multiple Rows with Unique Values &#8211; MySQL &#171; Intellega Tech Blog</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-23702</link>
		<dc:creator>Update Multiple Rows with Unique Values &#8211; MySQL &#171; Intellega Tech Blog</dc:creator>
		<pubDate>Tue, 15 Nov 2011 23:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-23702</guid>
		<description>[...] http://www.karlrixon.co.uk/articles/sql/update-multiple-rows-with-different-values-and-a-single-sql-... [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.karlrixon.co.uk/articles/sql/update-multiple-rows-with-different-values-and-a-single-sql-.." rel="nofollow">http://www.karlrixon.co.uk/articles/sql/update-multiple-rows-with-different-values-and-a-single-sql-..</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jermaine</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-23118</link>
		<dc:creator>jermaine</dc:creator>
		<pubDate>Sat, 05 Nov 2011 07:30:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-23118</guid>
		<description>am kinda a newbie to php and mysql...
how would u update multi rows tht has more than one field</description>
		<content:encoded><![CDATA[<p>am kinda a newbie to php and mysql&#8230;<br />
how would u update multi rows tht has more than one field</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nvamsk</title>
		<link>http://www.karlrixon.co.uk/writing/update-multiple-rows-with-different-values-and-a-single-sql-query/comment-page-2/#comment-22988</link>
		<dc:creator>nvamsk</dc:creator>
		<pubDate>Tue, 01 Nov 2011 17:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=51#comment-22988</guid>
		<description>Hi Karl

I want to update following 

col1	col2	col3
1	abc	
2	abc	
3	pqr	

to

col1	col2	col3
1	abc	1
2	abc	1
3	pqr	3


plzz help</description>
		<content:encoded><![CDATA[<p>Hi Karl</p>
<p>I want to update following </p>
<p>col1	col2	col3<br />
1	abc<br />
2	abc<br />
3	pqr	</p>
<p>to</p>
<p>col1	col2	col3<br />
1	abc	1<br />
2	abc	1<br />
3	pqr	3</p>
<p>plzz help</p>
]]></content:encoded>
	</item>
</channel>
</rss>

