dspeterson (4/19/2013)
Lowell (4/19/2013)
could it be someone was cleaning up data and used a REPLACE without a WHERE statement?the rowversion gets incrmeneted even thought here was no "real" change:
Looks like doing something stupid like running an update and setting a field to the value that already exists does this too, I'm bugging my devs more, but of course no one wants to fess up.
Consider that almost 100% of updates sprocs don't look to see if the values have changed. If they did they would be horrible to write and they would be super slow.
create MyUpdateProc
(
@Col1 varchar(10),
@ID int
) as
update MyTable
set Col1 = @Col1
where ID = @ID
The above is a super simplified typical update sproc. This would cause the rowversion to be modified.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/