It works because you are updating the row that is changing and not some other row in the table. I did not realize at first that you were updating a column based on another column in the same row.