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 & the other SQL 2000, both using the same data, same SQL Statements & 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.
CREATE TABLE #Test
Row INT IDENTITY (1, 1),
CREATE TABLE #UpdateResult
SET Result = #Test.Result
DROP TABLE #UpdateResult
DROP TABLE #Test
- Is this a setting that is specified anywhere? If so can it be changed?