Skip to content
Advertisement

MS Access SQL for UNION from 3 similar tables INSERT INTO a single field in a 4th table?

Aim:
Select all distinct values from three different columns, each located in a different table: [QueryA].Att1, [QueryB].Att2, [QueryC].[Att C].
Return all selected values in a single column in a 4th table: [Table1].Field1

The ‘INSERT INTO’ line isn’t working. The rest of it works (makes query) when 1st line is removed.

The rest of it works (makes query) when 1st line is removed.

Error message:

Syntax error in FROM clause.

Advertisement

Answer

In MS Access, you need to place UNION in a subquery or entirely separate query to be included in an append. Additionally, period qualifier between table and column should not be used in INSERT INTO:

Alternatively, with a separate query:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement