More

How Can I Pivot a Table in Microsoft Access?

It used to be possible to pivot tables in older versions of Microsoft Access (Access 2010). The option to pivot tables seems now to have been removed. Furthermore, the SQL PIVOT operator does not appear to be supported by MS Access. So what are my options if I wish to pivot my data in an Access database?

Specifically, my problem is this:
I have a ‘Contacts‘ table in my Access database which contains names, addresses, etc of my contacts, EXCEPT all phone numbers are stored in a separate ‘PhoneNumber‘ table. This is because I want to give descriptions to each number. So there are four columns in the PhoneNumbers table:

  1. NumberID (Primary Key)
  2. Contacts ID (Foreign Key)
  3. Description (eg: ‘Mobile’, ‘Home’, ‘Work’)
  4. PhoneNumber

The two tables are inner joined on contactID.

I wish to display all my records from the ‘Contacts‘ table together with the ‘Description’ field from the ‘PhoneNumbers‘ table appended to this dataset.

The entries from the ‘PhoneNumber‘ field of the ‘PhoneNumbers‘ table, I wish to be presented as record entries inside the Description field. This can be done using SQL PIVOT and using MAX(PhoneNumber) as the aggregating function -But, PIVOT does not appear to be supported in MS Access. Am I right? If so, how can I achieve my aim?

Steffy Alen

Share
Published by
Steffy Alen

Recent Posts

What You Need to Know Before Visiting Alaska in Winter

Dreaming of snow-draped landscapes, Northern Lights, and cozy evenings in a winter wonderland? Alaska in…

3 weeks ago

Bringing Friends Together for a Great Time at Sea: Discover the Best Boat Charter in Malta

Embark on an unforgettable adventure along the breathtaking Maltese coast. Malta Charters, located in the…

3 weeks ago

Contact Novita Lab Grown Diamonds for Your Jewelry Needs

Finding the perfect piece of jewelry often starts with reaching out to the right experts,…

1 month ago

Diamantes Sintéticos y Lab Made Diamonds: Una Guía Completa

Los diamantes sintéticos y los lab made diamonds (diamantes creados en laboratorio) están transformando el…

1 month ago

Novita Diamonds: Empowering Women Through Leadership and Innovation

The jewelry industry has long been associated with luxury, glamour, and elegance, but behind many…

2 months ago

Why a Morocco Tour Should Be on Your 2024 Travel Bucket List: Ultimate Travel Insights

An 8-day Morocco tour from Marrakech is the perfect way to immerse yourself in the…

2 months ago