Hi,
In a query such as :
Select myfield1 as myfield, sum(myval1) as totval from mytable1 group by myfield1
Union Select myfield2, sum(myval2) from mytable2 group by myfield2
how can get I get the sum from table to be added to the sum from table2. As it is, the sums don't merge together where the same item is found in both myfield1 and myfield2.
I tried UNION ALL without success.
Thanks.
In a query such as :
Select myfield1 as myfield, sum(myval1) as totval from mytable1 group by myfield1
Union Select myfield2, sum(myval2) from mytable2 group by myfield2
how can get I get the sum from table to be added to the sum from table2. As it is, the sums don't merge together where the same item is found in both myfield1 and myfield2.
I tried UNION ALL without success.
Thanks.