Is there a set-based approach to achieving the following: (At the moment, I am doing this with a cursor which is probably not the best option.)
The target table (myTable) that I wish to loop through has an integer column (myColumn). What I am trying to do here is to keep a running total of the values in this column. If at the end of the loop, the total = 0, then <do something> Else <do something else>.
My question: Is it possible to get the running total with a set-based approach?
TIA!