Hello all,
I have an access query which I'm having trouble with. The query runs but the numbers that come out don't seem to make logical sense.
The query (with query and field names substituted) is as follows:
SELECT sum(currencyField) from
A
UNION ALL
select sum(currencyField) from
B
UNION ALL
Select sum(currencyField) from
(select * from A union all select * from B);
The query then outputs something along the lines of (actual values are substituted):
1.70
0.30
1.90
Now 1.90 is less than 2.00 - In other words the total value of two discrete tables is greater than the value of those two tables after a union all. What am I doing wrong?
Thanks,
D.
I have an access query which I'm having trouble with. The query runs but the numbers that come out don't seem to make logical sense.
The query (with query and field names substituted) is as follows:
SELECT sum(currencyField) from
A
UNION ALL
select sum(currencyField) from
B
UNION ALL
Select sum(currencyField) from
(select * from A union all select * from B);
The query then outputs something along the lines of (actual values are substituted):
1.70
0.30
1.90
Now 1.90 is less than 2.00 - In other words the total value of two discrete tables is greater than the value of those two tables after a union all. What am I doing wrong?
Thanks,
D.