[AccessD] Consolidating two sets of values

David Emerson newsgrps at dalyn.co.nz
Fri May 1 22:04:16 CDT 2015


Hi Listers,

 

I am having a brain freeze at the moment.  I have a table with three fields:
Employee, Date, Sales.

 

Up to now the client wanted the total for each employee.  No problem:

 

SELECT tblSales.Employee, Sum(tblSales.Sales) AS SumOfSales

FROM tblSales

GROUP BY tblSales.Employee;

 

Now the client wants the same except he wants two employee figures to be
combined into one figure.  For example

 

Results of current query:

 

Bob $5000

Jim $2000

Joe $1000

Lee $8000

 

Now let's say that Bob and Jim are to be combined as Gen.  The results are
now to be:

 

Gen $7000

Joe $1000

Lee $8000

 

What is the syntax I should use?

 

Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand

 

 

 



More information about the AccessD mailing list