sum on date/time from multiple tables

K

Kim D

I have two tables that contain date/time data. Table One contains records
daily, the other (Table Two) on weekly intervals. For the most part, the
weekly dataset is 7 days, however it can be 6-8 days, and there's usually an
hour or 2 difference between the times for each week. I want to create a
query to sum data from Table 1 based on the interval of Table 2. For Example:
Table 1 Table 2
FlowDateandTime Flow(MGD) SampleDateandTime
Result
12/01/2008 12.5 12/02/2008
15:30:00 150
12/02/2008 13.2 12/09/2008
12:15:00 142
.......(keeps going at daily intervals) 12/15/2008
13:30:00 65
12/16/2008 14:00 12.0


I want to sum the daily flows between sample dates in table 2. For
example, I would have the sum of Flow(MGD) 12/3-12/9 for the second
sampleDateandTime shown here. Is there a way for me to do this?
Thanks in advance for your help.
 
M

Michel Walsh

You cannot relay on the POSITION of the records, I mean, you cannot make a
join where you will match the n-th record of table1 with the n-th record of
table2. That is maybe not what you are doing, in any case, but I mention it
because I fail to see where the limits, as 12/3/2008 you supplied in your
explanation, come from.


Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top