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
|
|||
|
|||
Query Quandries
i have a table, tblgeneral, that contains order
information on customers, referenced by tblcustomer, what i am attempting to do is show how many unique customers - and the total repair cost for a date range per salesman. for example; salesman 1 had a total repair cost of 1500.00 for the month of january 04 from 5 different customers. what i am currently getting is; salesman 1 had a total of 1500.00 from 20 customers (it is counting the total number of customers - not the unique number) Please help - i am getting so confused. Frank |
#2
|
|||
|
|||
Query Quandries
Could you post the SQL for your query.
-- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Frank" wrote in message ... i have a table, tblgeneral, that contains order information on customers, referenced by tblcustomer, what i am attempting to do is show how many unique customers - and the total repair cost for a date range per salesman. for example; salesman 1 had a total repair cost of 1500.00 for the month of january 04 from 5 different customers. what i am currently getting is; salesman 1 had a total of 1500.00 from 20 customers (it is counting the total number of customers - not the unique number) Please help - i am getting so confused. Frank |
#3
|
|||
|
|||
Query Quandries
SELECT TBLSALESREP.Region, TBLSALESREP.SalesRep, Count
(CLIENTES.CODIGO) AS CountOfCODIGO, Sum([TBL GENERAL]. [REPAIR PRICE]) AS [SumOfREPAIR PRICE] FROM TBLSALESREP INNER JOIN (CLIENTES INNER JOIN [TBL GENERAL] ON CLIENTES.CODIGO = [TBL GENERAL].[CUST ID]) ON TBLSALESREP.SalesRep = CLIENTES.VENDEDOR WHERE ((([TBL GENERAL].[RPRD DATE]) Between [Starting Date] And [Ending Date])) GROUP BY TBLSALESREP.Region, TBLSALESREP.SalesRep; -----Original Message----- Could you post the SQL for your query. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Frank" wrote in message ... i have a table, tblgeneral, that contains order information on customers, referenced by tblcustomer, what i am attempting to do is show how many unique customers - and the total repair cost for a date range per salesman. for example; salesman 1 had a total repair cost of 1500.00 for the month of january 04 from 5 different customers. what i am currently getting is; salesman 1 had a total of 1500.00 from 20 customers (it is counting the total number of customers - not the unique number) Please help - i am getting so confused. Frank . |
Thread Tools | |
Display Modes | |
|
|