Use the advanced formula.
UPDATE #AutoOrderItems SET ExpectedSales=0
UPDATE #AutoOrderItems SET StockRequirement=-QtyOnhand-QtyOnOrder-QtyToBePosted-QtyIT where QtyOnhand+QtyOnOrder+QtyToBePosted+QtyIT<0