Hi,
I have a bit of a problem with an Access query. I don't think the solution will be very complicated but I can't quiet figure it out. The easiest way to explain it is to give an example:
I have three tables July Usage, August Usage and September Usage,
There is only 2 fields in each table, the user and their usage given in minutes.
Example data;
July Usage
Tom 2000
Mary 3000
Ed 1500
Aug. Usage
Mary 2500
Will 1000
Tom 2000
Sept. Usage
Tom 2000
Ray 1500
Mary 3000
I also have another table of users called User_Detail.
What I want is a list of all users and their usage however my query is just returning the users that appear in all 3 tables, ie. Tom and Mary.
The SQL view of the query is as follows:
SELECT User_Detail.corp_id,
User_Detail.name,
Jul_Usage.Total,
Aug_Usage.Total,
Sept_Usage.Total
FROM ((User_Detail INNER JOIN Aug_Usage
ON User_Detail.corp_id = Aug_Usage.[Corp ID])
INNER JOIN Jul_Usage
ON User_Detail.corp_id = Jul_Usage.[Corp ID])
INNER JOIN Sept_Usage
ON User_Detail.corp_id = Sept_Usage.[Corp ID];
If anyone could offer any words of advice on how to solve this, either using SQL or the QBE it would be much appreciated,
Thank you,
cm80
I have a bit of a problem with an Access query. I don't think the solution will be very complicated but I can't quiet figure it out. The easiest way to explain it is to give an example:
I have three tables July Usage, August Usage and September Usage,
There is only 2 fields in each table, the user and their usage given in minutes.
Example data;
July Usage
Tom 2000
Mary 3000
Ed 1500
Aug. Usage
Mary 2500
Will 1000
Tom 2000
Sept. Usage
Tom 2000
Ray 1500
Mary 3000
I also have another table of users called User_Detail.
What I want is a list of all users and their usage however my query is just returning the users that appear in all 3 tables, ie. Tom and Mary.
The SQL view of the query is as follows:
SELECT User_Detail.corp_id,
User_Detail.name,
Jul_Usage.Total,
Aug_Usage.Total,
Sept_Usage.Total
FROM ((User_Detail INNER JOIN Aug_Usage
ON User_Detail.corp_id = Aug_Usage.[Corp ID])
INNER JOIN Jul_Usage
ON User_Detail.corp_id = Jul_Usage.[Corp ID])
INNER JOIN Sept_Usage
ON User_Detail.corp_id = Sept_Usage.[Corp ID];
If anyone could offer any words of advice on how to solve this, either using SQL or the QBE it would be much appreciated,
Thank you,
cm80