Others

How to Flatten Multiple Access Fields into One Normalized Table

Ayan MasoodAyan Masood Oct 26, 2026 868 views

Question details

The user needs to normalize a database table by converting multiple repeating fields (such as Item1, Item2, and Item3) into a single unified column, while properly handling duplicate values.

How to Flatten Multiple Access Fields into One Normalized Table
Product
Microsoft Access
Device & OS
not provided
Scenario
Restructuring an unnormalized database table that contains repeating groups into a properly normalized format for better querying and reporting.
Observed behavior
Data is horizontally spread across multiple item columns instead of being vertically structured in a single column, which violates database normalization rules.
Before you start

Identify the primary key of your source table and note the exact names of the repeating fields you want to combine to ensure your queries map the data correctly.

Solution 1Recommended

Use a UNION Query to Combine Fields

Writing a UNION query is the most efficient method to append multiple item fields into a single normalized column while automatically filtering out duplicate rows.

A UNION query combines the result sets of two or more SELECT statements into a single result set. By default, a standard UNION operation automatically removes duplicate records, which is often desirable when normalizing data. If your business logic requires keeping duplicates, you can use UNION ALL instead.

1
Open Query Design

In your Microsoft Access database, navigate to the Create tab on the top ribbon and click on 'Query Design'.

2
Switch to SQL View

Close the 'Show Table' dialog box without adding any tables. Right-click the query tab and select 'SQL View' from the context menu.

3
Write the SELECT Statements

Type your first SELECT statement targeting the first field, for example: SELECT ID, Item1 AS NormalizedItem FROM YourTableName WHERE Item1 IS NOT NULL;

4
Add the UNION Operator

Add the word 'UNION' below the first statement, followed by the next SELECT statement: SELECT ID, Item2 AS NormalizedItem FROM YourTableName WHERE Item2 IS NOT NULL;

5
Run the Query

Repeat the process for all remaining item fields. Once complete, click the 'Run' button (the red exclamation mark) in the Design tab to view your newly flattened data.

Use a UNION Query to Combine Fields
Handling Duplicates: If you need to retain duplicate values (e.g., an item appearing on both Monday and Tuesday), replace 'UNION' with 'UNION ALL' in your SQL syntax.
Free Microsoft Office alternative

Manage and Analyze Data Easily with WPS Office

While Microsoft Access is used for complex relational database tasks like SQL normalization, many data flattening and analysis tasks can be achieved effortlessly using a spreadsheet. WPS Spreadsheet offers a lightweight, highly compatible alternative for organizing, filtering, and manipulating tabular data without needing to write SQL queries.

  1. 1. Download and Install: Visit the official WPS website to download and install the free WPS Office suite on your device.
  2. 2. Open WPS Spreadsheet: Launch WPS Spreadsheet and open your exported database tables or raw data files.
  3. 3. Organize Your Data: Use built-in data tools like PivotTables or text-to-columns to easily flatten and analyze your data sets.
Completely free and lightweight office suiteSeamless compatibility with Microsoft Excel (.xlsx) formatsAdvanced data filtering, sorting, and pivoting capabilitiesFamiliar user interface for immediate productivity
QA img-9

Frequently Asked Questions

Why is it necessary to flatten multiple fields into one?

Flattening fields such as Item1, Item2, and Item3 into a single column follows the First Normal Form (1NF) of database normalization. It eliminates repeating groups, making the database easier to query, maintain, and scale.

What is the difference between UNION and UNION ALL?

The UNION operator automatically filters out duplicate records across the combined result sets. UNION ALL, on the other hand, includes every record from all SELECT statements, preserving any duplicates that exist.

Can I flatten these fields without using SQL code?

Yes. You can create a new target table and use multiple Append queries in the visual Query Design mode to push data from each column into the new table one by one.

How do I ignore blank values when normalizing?

You can exclude blank values by adding a WHERE clause in your SQL statement (e.g., WHERE Item1 Is Not Null) or by adding 'Is Not Null' in the Criteria row of your visual Query Design.