<?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 single row error</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/update-single-row-error/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/update-single-row-error/</link>
	<description></description>
	<lastBuildDate>Tue, 18 Jun 2013 06:50:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tudz drkl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/update-single-row-error/#comment-50463</link>
		<dc:creator>tudz drkl</dc:creator>
		<pubDate>Thu, 25 Oct 2007 13:09:23 +0000</pubDate>
		<guid isPermaLink="false">#comment-50463</guid>
		<description><![CDATA[Your update query will work - this is a very common update method - only if the correlated subquery returns only one row for each mfr_code.  Check your data by looking for multiple rows by GROUPING BY mfr_code.  Also make sure you do not have any NULL mfr_codes.  Another good practice is to always add an exists clause to a correlated update.  This exist clause will include the same join criteria and predicates as the update subquery and ensure you do not update rows not intended for update:

AND EXISTS ( SELECT 1
FROM eqp_mfr_names
WHERE mfr_code = p.mfrcode)]]></description>
		<content:encoded><![CDATA[<p>Your update query will work &#8211; this is a very common update method &#8211; only if the correlated subquery returns only one row for each mfr_code.  Check your data by looking for multiple rows by GROUPING BY mfr_code.  Also make sure you do not have any NULL mfr_codes.  Another good practice is to always add an exists clause to a correlated update.  This exist clause will include the same join criteria and predicates as the update subquery and ensure you do not update rows not intended for update:</p>
<p>AND EXISTS ( SELECT 1<br />
FROM eqp_mfr_names<br />
WHERE mfr_code = p.mfrcode)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.035 seconds using memcached
Object Caching 266/272 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-18 06:58:06 -->