I\'m a humble programmer that hates SQL ... :) Please help me with this query.
I have 4 tables, for example:
Table A: Id Total 1 100 2 200 3 500
Try this code SELECT Total=isnull((Select Sum(Isnull(Amount,0)) from table a),0)+isnull((Select Sum(isnull(Amount,0)) from table b),0)+isnull((Select Sum(isnull(Amount,0)) from table c),0)