Here is a tabular representation of what I would like to achieve with an UPDATE statement.
+----+----+---+---+----+----------+---------------+---------------+
|
Just do the calculations independently:
update [EXAMPLE]
set [Calc A] = A - B,
[Calc B] = (A - B) / D,
[Calc C] = B / ((A - B) / D)
I actually found a solution to this problem using local variables in the SET statements. See below.
UPDATE [EXAMPLE]
SET [Calc A] = @calc_a : = A - B
, [Calc B] = @calc_b := @calc_a / D
, [Calc C] = B / @calc_b