Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7435497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:05:05+00:00 2026-05-29T10:05:05+00:00

I am trying to create a query in MS Access to ultimately take the

  • 0

I am trying to create a query in MS Access to ultimately take the output from this:

Name        Cat 1   Cat 2   Cat 3   Cat 4   Cat 5   Cat 6
Joe         2       12      10      1       0       0
Bob         0       0       0       0       0       0
Jody        2       4       3       1       2       0
Harry       0       4       14      0       2       0

To something like this:

Name        Joe     Bob     Jody    Harry
Cat 1       2       0       2       0
Cat 2       12      0       4       4
Cat 3       10      0       3       14

Is this even possible?

EDIT

SELECT [Authorizer Name], 
Sum([Q1A - CD # 1]) AS [Category 1], 
Sum([Q2A- CD # 2A] + [Q8A- CD # 2A] + [Q10A- CD # 2A] 
    + [CTS A accurate- CD # 2A] 
    + [e-correspondence A accurate- CD # 2A]) AS [Category 2], 
Sum([Q7A- CD # 2B] + [Q9A- CD # 2B] + [Q11A- CD # 2B] 
    + [CTS A procedures- CD # 2B] 
    + [e-correspondence A procedures- CD # 2B]) AS [Category 3], 
Sum([Q4A- CD # 3]) AS [Category 4], 
Sum([Q5A- CD # 4]) AS [Category 5], Sum([Q12A- CD # 5]) AS [Category 6] 
FROM [Review Results] 
WHERE [Review Results].[Authorizer Name] = 1 
GROUP BY [Review Results].[Authorizer Name];

This is the way the table currently is:

Name    X1 X2A   X2B X2C X3A X3B X3C X4 X5 
Joe     1  5     0   1   1   5   6   0  0
Bob     2  7     0   2   1   4   2   1  9 
Billy   0  8     0   3   1   3   1   0  9 

This is what I would like to get to:

Name     Joe                  Bob    Billy 
X1       1                     2         0 
X2 (sum of X2A/X2B/X2C) 6      9         11 
X3 (sum of X3A/X3B/X3C) 12     7         5 
X4       0                     1         0 
X5       0                     9         9
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:05:06+00:00Added an answer on May 29, 2026 at 10:05 am

    First create a UNION query to normalize your table, then a crosstab to display the data:

    SELECT [Name], "Cat 1" As Cat, [Cat 1] As CatVal FROM Table
    UNION ALL
    SELECT [Name], "Cat 2" As Cat, [Cat 2] As CatVal FROM Table
    <...>
    

    The query wizard will guide you through creating the crosstab.

    EDIT re comments

    To normalize the table of sample data, you can say:

    SELECT [Name], "X1" As Cat, [X1] As CatVal FROM Table
    UNION ALL
    SELECT [Name], "X2" As Cat, Nz([X2A],0)+Nz([X2B],0)+Nz([X2C],0) As CatVal 
       FROM Table
    UNION ALL
    SELECT [Name], "X3" As Cat, Nz([X3A],0)+Nz([X3B],0)+Nz([X3C],0) As CatVal 
       FROM Table
    UNION ALL
    SELECT [Name], "X4" As Cat, [X4] As CatVal FROM Table
    UNION ALL
    SELECT [Name], "X5" As Cat, [X5] As CatVal FROM Table
    

    Let us say the union query is QueryX:

    TRANSFORM First(QueryX.CatVal) AS FirstOfCatVal
    SELECT QueryX.Cat
    FROM QueryX
    GROUP BY QueryX.Cat
    PIVOT QueryX.Name;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to access a value from the code behind to create a query
I'm trying to create a query with the Criteria API from JPA 2.0, but
I'm trying to create a query in an access database for a C# dataset
I'm trying to create a report on MS Access. The query originating the report
I am trying to create a query that can handle grabbing values from multiple
I'm trying to create a simple database table using the PHP MySQL query Create
I have 4 databases with similar schema's, and I'm trying to create a query
I'm trying to create a linq query based on some dynamic/optional arguments passed into
I'm trying to create a faster query, right now i have large databases. My
I'm trying to create an SQL query in PHP to update a table. Is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.