Sum query

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
 
R

Rick Brandt

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.
 

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