Sum query

  • Thread starter Thread starter Super Slueth
  • Start date Start date
S

Super Slueth

Hello

I have a table with phone numbers in them and the duration that they
called I have a diffeerent table for each day. Each table has about
4000 records in it. There is about 200 phone number and they aopear in
each table


I would like to run a query that sums the duration with relation to
the phone number.

What I want is one column with the phone numbers, and different
colomns for the call duration for each day against the phone number.

I got it to work with onetable but when I add more tables for the
different days the sum of the durations isn't correct .

Any ideas on how to achieve this

Many thanks
 
Super said:
Hello

I have a table with phone numbers in them and the duration that they
called I have a diffeerent table for each day. Each table has about
4000 records in it. There is about 200 phone number and they aopear in
each table


I would like to run a query that sums the duration with relation to
the phone number.

What I want is one column with the phone numbers, and different
colomns for the call duration for each day against the phone number.

I got it to work with onetable but when I add more tables for the
different days the sum of the durations isn't correct .

Any ideas on how to achieve this

Yes, fix your design. One should (almost) never have multiple tables with the
same structure like that. You are experiencing the biggest reason.

Combine all data into one table with an additional field to indicate the date
and then your current requirement becomes simple. You can easily filter for any
single day instead of having individual tables.
 
Back
Top