actual values in crosstab query?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I create a cross tab query which simply displays the actual values
from the table?
 
I do not follow you question. Give an example of data and what you would
like to see in the results.
 
Name Net Pay Pensions CELL ALLOWANCE
Charmaine 70,000 4,000 2,000
Akena 60,000 3,000 1,000

But this is the format of the Data in Access.

First_name Desc Amt
CHARMAINE TRAVELLING $4,385.49
CHARMAINE Basic Salary $80,000.00
CHARMAINE PENSIONS ($4,000.00)
CHARMAINE CELL $4,000.00
CHARMAINE REFUND $2,000.00
CHARMAINE COLA $480.00
CHARMAINE NET PAY ($70,303.24)
 
If, big IF, the combination of the First_name and Desc fields are unique,
then any of the First, Last, Min, or Max functions will work. Again the combo
of the First_name and Desc fields must be unique. If they are the primary key
or a unique index, life is good. Otherwise you could have problems.

Plug in the correct table name for Keensie.

TRANSFORM First(Keensie.Amt) AS FirstOfAmt
SELECT Keensie.First_name, First(Keensie.Amt) AS [Total Of Amt]
FROM Keensie
GROUP BY Keensie.First_name
PIVOT Keensie.Desc;

If not unique, try this:
TRANSFORM Sum(Keensie.Amt) AS SumOfAmt
SELECT Keensie.First_name, Sum(Keensie.Amt) AS [Total Of Amt]
FROM Keensie
GROUP BY Keensie.First_name
PIVOT Keensie.Desc;
 
Try this --
TRANSFORM Sum(keensie.Amt) AS SumOfAmt
SELECT keensie.First_name, Sum(keensie.Amt) AS [Total Of Amt]
FROM keensie
GROUP BY keensie.First_name
PIVOT keensie.Desc;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top