﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Update Statement - Differences between SQL Versions? / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 07:22:59 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Update Statement - Differences between SQL Versions?</title><link>http://www.sqlservercentral.com/Forums/Topic1361704-391-1.aspx</link><description>I had a feeling that would be the case. We're currently migrating an old Datawarehouse from SQL 2000 to SQL 2008 R2 and obviously we want the data to match across the systems. Fixing the problem is easy enough but this means we are left with inconsistencies between the two systems which isn't ideal. </description><pubDate>Thu, 20 Sep 2012 17:15:17 GMT</pubDate><dc:creator>dougjjj</dc:creator></item><item><title>RE: Update Statement - Differences between SQL Versions?</title><link>http://www.sqlservercentral.com/Forums/Topic1361704-391-1.aspx</link><description>I've seen this sort of "inconsistent" result on UPDATEs where you're applying multiple rows to a single row and I don't believe it is controlled by a setting.You need to control it by specifying which row of #Test updates the #UpdatedResults table, like by using a WHERE clause.</description><pubDate>Thu, 20 Sep 2012 00:45:26 GMT</pubDate><dc:creator>dwain.c</dc:creator></item><item><title>Update Statement - Differences between SQL Versions?</title><link>http://www.sqlservercentral.com/Forums/Topic1361704-391-1.aspx</link><description>Hi, I've been having a chat with Google and haven't been able to find an answer to it so here goes ...I have 2 servers, one SQL 2008 R2 &amp; the other SQL 2000, both using the same data, same SQL Statements &amp; same Collation and they are returning different results. The SELECT statement of the UPDATE returns multiple rows for each row that is updated. SQL 2008 R2  uses the values from the First row returned and SQL 2000 is using the values from the Last row returned for each update. Example below ... - If I run the code below on a SQL 2008R2 machine the result is 1. - If I run the code below on a SQL 2005 machine the result is 1.- If I run the code below on a SQL 2000 machine the result is 3.[code]CREATE TABLE #Test(	Row INT IDENTITY (1, 1),	Result INT)CREATE TABLE #UpdateResult(	Result INT)INSERT	#UpdateResultSELECT	0INSERT #TestSELECT 1INSERT #TestSELECT 2INSERT #TestSELECT 3UPDATE	#UpdateResultSET	Result = #Test.Result FROM	#TestSELECT	* FROM	#UpdateResultDROP TABLE #UpdateResultDROP TABLE #Test[/code]Questions ...- Huh?- Is this a setting that is specified anywhere? If so can it be changed?</description><pubDate>Wed, 19 Sep 2012 19:57:59 GMT</pubDate><dc:creator>dougjjj</dc:creator></item></channel></rss>