I am trying to figure out how to create a table that merges records from two tables with identical structure. Each table will have the following fields: a document_ID as the primary key, a documentNumber, a documentRevision, and a documentTitle. The only difference in the two tables is that each table holds a certain "Type" of document. The merged table should end up holding ALL documents from both tables.
I have tried to use an append query, but I ran into an issue where I couldn't figure out how to get the query to run when a record was inserted into each table. In my search online, I saw some things about "Joining", but I had no luck at understanding how to make it work.
Any help is appreciated!
table1 : Documents of Type 1
+---------------+--------------------+-----------------+-------------------+
| Document ID | Document Number | Document Rev | Document Title |
+---------------+--------------------+-----------------+-------------------+
| 1 | GCD_111 | - | Title GCD1 |
| 2 | GCD_222 | A | Title GCD2 |
| 3 | GCD_333 | B | Title GCD3 |
+---------------+--------------------+-----------------+-------------------+
table2 : Documents of Type 2
+---------------+--------------------+-----------------+-------------------+
| Document ID | Document Number | Document Rev | Document Title |
+---------------+--------------------+-----------------+-------------------+
| 4 | TSR_111 | - | Title TSR1 |
| 5 | TSR_222 | A | Title TSR2 |
| 6 | TSR_333 | B | Title TSR3 |
+---------------+--------------------+-----------------+-------------------+
Result Table: Documents of Type 1 and Type 2
+---------------+--------------------+-----------------+-------------------+
| Document ID | Document Number | Document Rev | Document Title |
+---------------+--------------------+-----------------+-------------------+
| 1 | GCD_111 | - | Title GCD1 |
| 2 | GCD_222 | A | Title GCD2 |
| 3 | GCD_333 | B | Title GCD3 |
| 4 | TSR_111 | - | Title TSR1 |
| 5 | TSR_222 | A | Title TSR2 |
| 6 | TSR_333 | B | Title TSR3 |
+---------------+--------------------+-----------------+-------------------+

select document_id, document_number ... from table1 UNION ALL document_id, document_number ... from table2> Run - zedfoxus