lakiri333 - Thursday, March 7, 2019 12:58 AM
Need a few more details to be specific, but I'm guessing your loop is not committing the transaction that is applying the updates. So while the loop is running, the transaction is open and, if your isolation level is read committed, you will only get the old value because the new value has not been committed to the database.
If you can explain why you're trying to do this, along with some code, table schema and example data, you might get some more insight on this.