Others

How to Create a Microsoft Access Table from a UNION ALL Query Without SQL Errors

Steve KSteve K Nov 13, 2026 870 views

Question details

The user needs to create a Microsoft Access table from a complex UNION ALL query but receives a syntax error when using the UNION ALL statement directly in a make-table query.

How to Create a Microsoft Access Table from a UNION ALL Query Without SQL Errors
Product
Microsoft Access
Device & OS
not provided
Scenario
The user wants to combine rows from multiple tables using UNION ALL and materialize the result as a new Access table.
Observed behavior
Running a make-table query directly on the complex UNION ALL statement returns Characters found after end of SQL statement or similar SQL syntax errors.
Before you start

Before editing your query, open the Microsoft Access database and confirm that the UNION ALL statement runs correctly on its own. Also make sure you have permission to create and modify queries and tables in the target database.

Solution 1Recommended

Save the UNION ALL Statement as a Separate Access Query

Use this method when a make-table query based directly on a complex UNION ALL statement fails with SQL syntax errors; it separates the union logic from the table-creation operation.

Microsoft Access may misinterpret trailing semicolons or nested UNION syntax inside a make-table query. Saving the UNION ALL statement as a named query lets Access parse the union logic first, and the make-table query then simply references the saved query.

1
Open the Create Query View

In Microsoft Access, go to the Create tab and click Query Design, then close the Show Table dialog to open a blank query in Design view.

2
Switch to SQL View

On the Query Design ribbon, click SQL View or select View > SQL View, and replace the default SQL with your full UNION ALL statement.

3
Save the UNION query

Press Ctrl+S, name the query meaningfully such as qryUnionAll, and run it once to verify that the combined rows display correctly.

4
Create the make-table query

Go to Create > Query Design, add the saved qryUnionAll query as the data source, click Make Table on the ribbon, enter the destination table name, and then run the query.

Save the UNION ALL Statement as a Separate Access Query
Syntax error avoided: After running the make-table query, the new table contains the combined output and the original UNION ALL syntax issue is avoided.
Free Microsoft Office alternative

WPS Office: A Free Alternative to Microsoft Office for Everyday Files

WPS Office does not include an Access database module, but it is a free, lightweight alternative to Microsoft Office for documents, spreadsheets, and presentations. It opens and saves .docx, .xlsx, and .pptx files with high compatibility, uses a familiar ribbon interface, and makes it easy to switch from Microsoft Office without losing your everyday files.

  1. 1. Download WPS Office: Go to the WPS Office download page and click Download WPS Office Free to get the installer for Windows, macOS, or your supported device.
  2. 2. Install and sign in: Run the downloaded installer, follow the on-screen setup, and sign in with a free WPS account to activate the suite.
  3. 3. Open your Microsoft Office files: Launch WPS Office, click Menu > Open, and select your existing .docx, .xlsx, or .pptx files; they open in the familiar ribbon interface.
Free to download and use for Word, Excel, and PowerPoint tasks that do not require Microsoft AccessHigh compatibility with Microsoft Office formats including .docx, .xlsx, and .pptxFamiliar ribbon interface and standard office tools for smooth migration from Microsoft OfficeLightweight, fast, and includes PDF viewing and conversion tools
microsoft office alternative - wps office

Frequently Asked Questions

Why does a make-table query with UNION ALL return Characters found after end of SQL statement?

Access often reads extra semicolons or nested UNION syntax in the same SQL as invalid after the main statement. Save the UNION ALL as a separate query and base the make-table query on that saved query.

Can I use SELECT INTO with a UNION ALL query in Microsoft Access?

It can work for simple statements, but complex UNION ALL queries often trigger syntax errors. The safer path is to save the UNION query first and then use it as the source of a make-table query.

Does WPS Office include Microsoft Access?

No, WPS Office does not include an Access database application. It provides Writer, Spreadsheet, Presentation, and PDF tools, and it opens and saves common Microsoft Office formats like .docx, .xlsx, and .pptx.

How do I switch a query to SQL View in Microsoft Access?

Open the query in Design View, then click SQL View on the Query Design ribbon, or select View > SQL View from the status bar shortcut menu.

Can I edit the saved UNION query later?

Yes. Open the saved query in SQL View, change the UNION ALL statement, save it, and any make-table query that uses it as a source will reflect the updated logic.