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 349089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:25:33+00:00 2026-05-12T11:25:33+00:00

I currently have a table structure that looks something like this(some details omitted): ColumnName

  • 0

I currently have a table structure that looks something like this(some details omitted):

  ColumnName         || Type
  Date_Of_Job           DateTime
  Reparied_Service      Boolean 
  Disconnect_Service    Boolean 
  Relayed_Service       Boolean 
  Reparied_Stopcock     Boolean 
  Replaced_Stopcock     Boolean 
  TPFNR_Repaired        Boolean 
  TPFNR_Replaced        Boolean 
  TPFNR_Capped          Boolean 
  Poor_Pressure_Tested  Boolean 
  Flow_Test             Boolean 
  Meter_replaced        Boolean 

What I want to be able to show is a cross tab query with the month(Date_Of_Job) as the column headers and the different types of jobs as the row headers with the count of each job for that month.

So something like this:

==Job Type===========01=====02=====03 etc
Reparied_Service     5      20     30
Disconnect_Service   15     45      9
Relayed_Service      18      7      6
Reparied_Stopcock    18 
Replaced_Stopcock    20 
 etc

The problem that I have is that the each job type is stored as a boolean column because each record can included multiple job type. For example you can log a Reparied_Stopcock job as well as a Flow_Test for the one record.

Does anyone know how I can do this in access or MS SQL, it doesn’t really matter which one.

  • 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-12T11:25:33+00:00Added an answer on May 12, 2026 at 11:25 am

    Assuming Date_Of_Job values are from the same year, you can base an Access cross tab query on a UNION subselect.

    TRANSFORM Count(q.[job_type]) AS num_jobs
    SELECT q.[job_type]
    FROM (
        SELECT
            Month(Date_Of_Job) AS job_month
            , "Reparied_Service" AS job_type
        FROM Jobs
        WHERE Reparied_Service=True
        UNION ALL
        SELECT
            Month(Date_Of_Job) AS job_month
            , "Disconnect_Service" AS job_type
        FROM Jobs
        WHERE Disconnect_Service=True
        ) AS q
    GROUP BY q.[job_type]
    PIVOT q.[job_month];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data-structure (in plist) that looks something like this: What i have
I am currently implementing something quite similar to checkers. So, I have this table
I'm trying to normalize a mysql database.... I currently have a table that contains
Currently we have a table that we use to track inivitations. We have an
Currently I have a table that I search upon 4 fields, FirstName, LastName, MiddleName,
I currently have the following row in my table: course_data: user_id days <-- This
In report design, I have 2 tables (Current and Proposed) the structure like this:
I have a fairly simple dynamic html structure of a table that contains links
I have data frame that looks like the following models cores time 1 4
I have a table in html with some tabular data. The thing is that

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.