If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Eliminate duplicates in query
Access 2000. I have a main table and a details table. The main table has:
EmployeeID, CurrentDate, Expenses. The details table has: CustomerID, Fees, Miles, Hours. I have a query with both tables joined. An employee may have 1 to 6 records in the details table per day. The problem is when i run the query I get "Expenses" listed multiple times coresponding to the number of records in the details table. I need a report that shows me the expenses for one day ($48.00) not $288.00 if I have 6 records. Thanks, Randy |
#2
|
|||
|
|||
Eliminate duplicates in query
Randy wrote: Access 2000. I have a main table and a details table. The main table has: EmployeeID, CurrentDate, Expenses. The details table has: CustomerID, Fees, Miles, Hours. I have a query with both tables joined. An employee may have 1 to 6 records in the details table per day. The problem is when i run the query I get "Expenses" listed multiple times coresponding to the number of records in the details table. I need a report that shows me the expenses for one day ($48.00) not $288.00 if I have 6 records. Thanks, Randy SELECT SUM(Expenses) AS TotalExpenses FROM MyTable GROUP BY EmployeeID, ExpenseDate or something along those lines. Check out totals queries in the help. (Hidden carefully under the F1 key). |
Thread Tools | |
Display Modes | |
|
|