A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Quandries



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2004, 05:56 PM
Frank
external usenet poster
 
Posts: n/a
Default 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  
Old May 24th, 2004, 06:02 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default 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  
Old May 24th, 2004, 06:19 PM
Frank
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.