tableA:
tranactionid staffid amount
1001 19052 2000
1002 19043 3000
1004 19076 4000
tableB:
BudgetCode Budget
271098 20000
I want to sum Amount
in tableA
and subtract it from Budget
value 20000
20000 - 9000 = 11000