---
title: "Append vs join and how to stack tables | Oplema"
description: "Learn to append one table under another with UNION ALL or Power Query's Append, how appending differs from a join and what to check before you stack."
url: "https://oplema.com/learn/data-preparation/append"
updated: "2026-11-04"
---

Lesson 3 of 15 · Lab

# Append vs join: stacking rows from two tables

Appending stacks the rows of one table under another, so you get more rows and the same columns. A join does the reverse, adding columns to the same rows. Append when the tables hold the same kind of record, such as this month's orders under last month's.

A January file of 3 orders and a February file of 2 become one table of 5 orders, still with one `amount` column.

Your two files here come from [fictional Vandelay Coffee Supply](https://oplema.com/learn/data-preparation/what-is-data-prep), whose September export starts on August 25 to be safe.

10 rows and 8 rows go in, with two invoices in both files. How many come out?

18 rows. Union stacks rows and has no idea what an invoice is, so the overlap arrives without a warning. [Removing duplicates](https://oplema.com/learn/data-preparation/unique-and-duplicates) deals with it later.

## Stack two files, then break a column on purpose

1. This live flow in [Strata](https://oplema.com/strata), Oplema's browser app for data prep, opens with **Union** selected. Each preview row has a `Source`: `input_1` is the upper file, `input_2` the lower.
2. Set **When columns differ** to **Error on mismatch**. Nothing changes, because the names match.
3. Select the lower **Manual Input**. In its table, scroll right and select the header `amount`, change it to `price`, then select the block on the canvas.
4. Select **Union**. It turns red: the columns differ. Change the lower input's header back to `amount`, and the red clears.
5. Select **Summarize**, the last block: 10 rows and 8. Select **Add**, set the new **Action** to **Sum**, and open its **Column** list. It stays red: no column here is numeric, because `amount` is text. [Grouping and summarizing](https://oplema.com/learn/data-preparation/summarize) covers Summarize properly.

## What Union checks, and what it can't

By default, a renamed column arrives as two half-empty columns and the flow still succeeds. **Error on mismatch** turns that quiet damage into a stop. It only checks names, though, so two files can agree on `amount` and mean different things by it.

The refused sum is a clue. `amount` holds `1.240` and `TBC`, so it's still text, and [Data types and casting](https://oplema.com/learn/data-preparation/types-and-casts) makes it a number. See the [Union reference](https://oplema.com/docs/strata/combine/union) for its settings.

## Common append mistakes

- **Mixed units or currencies.** Euros stacked on dollars add up without complaint and mean nothing. Check units, currency and what each row represents.
- **Overlapping periods.** A record in both files is counted twice until you deal with it.
- **Using append to add detail.** To bring in a customer's region, you want a [join](https://oplema.com/learn/data-preparation/joins).

## UNION ALL and Excel's Append

```
SELECT  invoice_id, amount  FROM  july
UNION ALL
SELECT  invoice_id, amount  FROM  august
```

`UNION ALL` keeps every row, while plain `UNION` also removes rows that are identical, including real repeats. SQL matches columns by position rather than name, so list them in the same order. In Excel, Power Query's Append matches by column name, and pasting or `VSTACK` matches by position.
