Ask Experts Questions for FREE Help !
Ask
    sukkarfarid's Avatar
    sukkarfarid Posts: 9, Reputation: 1
    New Member
     
    #1

    Sep 18, 2006, 01:22 AM
    Crosstab Query in MS Access
    How can I change the my query to crosstab query..
    please see the picture..



    I write this code... how can I change to a crosstab query

    SELECT SeaTable.location, Count(SeaTable.location) AS CountOflocation
    FROM SSFMainTable INNER JOIN SeaTable ON SSFMainTable.ID = SeaTable.MainTLink
    WHERE (((SSFMainTable.AD) Between [enter1] And [enter]))
    GROUP BY SeaTable.location
    HAVING (((SeaTable.location) Like "G/A*" Or (SeaTable.location) Like "Qiz*"));

    Thanks and regards
    Farid
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Sep 18, 2006, 06:07 AM
    A crosstab query requires THREE columns in the source. One column for the Rows, one for the columns and one for calculation. So you have to add a column to your query. I would add a column like so:

    Counts: " "

    Use the Crosstab Wizard and make that column your ROW, make the Location column your Columns and then count the primary key field for your counts.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Tax Query [ 4 Answers ]

If an Indian citizen works for a Canadian company from home in India, is the person eligible for income tax? The salary is wired through the Canadian company.

DNS Query Query. A Query about DNS Queries... [ 12 Answers ]

I am a software developer, I don’t know much about networks. I have a working network but with one weird (well to me it’s weird) problem. If you can offer any insight I’ll be very grateful! <!--- Image Attachment Below (I couldn't find a way to paste it here in the editor :-( ) ---> ...

Run MS access query as exe [ 1 Answers ]

Hi, I have to run few queries one after another. I created a form, so now I can run them in sequence with just 1 click of a button. It there a way that I can start running those queries by just loading the form and not clicking any button. My main aim is to have a schedule task so Access...

Update Query in Access [ 1 Answers ]

Hi there! How can I update different records differently in one field based on different criteria? Can I use the update query for that? Do I have to use a macro? Thanks for the help!


View more questions Search