I have a table1 with fields ID(primary key-number),Val1-number,Val2-number,Val3-number, year-number
I created 3 diffrent queries:
query1 returns ID and SUM(val1) if val1 not null
query2 returns ID and SUM(val2) if val2 not null and year=2005
query3 returns ID and SUM(val3) if val3 not null and year<>2005
With an append query I append a table2 with fields ID(primary key-number),SUMVal1-number,SUMVal2-number,SUMVal3-number
My problem is that i have records that should have value to all fields but with this method i only get the first append.
What i mean:
if query1 returns 50001 2 0 0
and query2 returns 50001 0 1 0
then in table2 i get 50001 2 0 0 but i want to get 50001 2 1 0
(the best way is to use an update query but unfortunately i cannot update the data of a table through query)
any suggestions?
thank you in advance!
I created 3 diffrent queries:
query1 returns ID and SUM(val1) if val1 not null
query2 returns ID and SUM(val2) if val2 not null and year=2005
query3 returns ID and SUM(val3) if val3 not null and year<>2005
With an append query I append a table2 with fields ID(primary key-number),SUMVal1-number,SUMVal2-number,SUMVal3-number
My problem is that i have records that should have value to all fields but with this method i only get the first append.
What i mean:
if query1 returns 50001 2 0 0
and query2 returns 50001 0 1 0
then in table2 i get 50001 2 0 0 but i want to get 50001 2 1 0
(the best way is to use an update query but unfortunately i cannot update the data of a table through query)
any suggestions?
thank you in advance!