query help

  • Thread starter Thread starter Chad
  • Start date Start date
C

Chad

I don't know if this is difficult or even possible but I
figured I would post just in case. I am pulling data from
on table to be inserted into another. The three fields I
am having problems with are Date, Reg_Hours, OT_Hours, and
Tot_Hours.

In the origional tables the data is listed as follows:

Date Reg_Hours OT_Hours Tot_Hours
1/1/00 5 0 5
1/1/00 0 3 3
2/1/00 10 0 10
2/1/00 0 4 4


I want to take taht data and insert it into a table in the
following format:

Date Reg_Hours OT_Hours Tot_Hours
1/1/00 5 3 8
2/1/00 10 4 14


Can anyone help me out. I am not sure if you can use a
SUM statement within an insert into query.

Thanks in advance,
Chad
 
The problem with trying to combine this data and insert it
into another table is that Access might tell you the query
is too complex. I've never been able to determine what
criteria it uses but it happens often enough.

I would suggest taking the data from the three tables and
do all summation or other calculations is a temp table,
then insert that data into the destination table.
 
You can make a totals query into an append or make table query. Group by
Date and sum your other fields. Change the query to an append query.

I assume you have a good reason for storing calculated, summarized data.
 
Back
Top