How to Flatten Multiple Access Fields into One Normalized Table
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.

- 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.
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.
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.
In your Microsoft Access database, navigate to the Create tab on the top ribbon and click on 'Query Design'.
Close the 'Show Table' dialog box without adding any tables. Right-click the query tab and select 'SQL View' from the context menu.
Type your first SELECT statement targeting the first field, for example: SELECT ID, Item1 AS NormalizedItem FROM YourTableName WHERE Item1 IS NOT NULL;
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;
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 Multiple Append Queries
If you prefer a visual approach over writing SQL code, you can use the Query Design interface to run multiple Append queries into a new destination table.
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. Download and Install: Visit the official WPS website to download and install the free WPS Office suite on your device.
- 2. Open WPS Spreadsheet: Launch WPS Spreadsheet and open your exported database tables or raw data files.
- 3. Organize Your Data: Use built-in data tools like PivotTables or text-to-columns to easily flatten and analyze your data sets.

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.




