# Replace Value in a Column

### Overview

This procedure finds and replaces all instances of a value within a specific table column. It helps keep your data clean and consistent by automatically replacing all matching values in the selected column.

### Input Concepts

| Concept       | Type             | Description                                       | Default    | Required |
| ------------- | ---------------- | ------------------------------------------------- | ---------- | -------- |
| `table`       | table            | The table to perform the replacement in.          | No default | Yes      |
| `column`      | text             | The name of the column to perform replacement in. | No default | Yes      |
| `value`       | text/number/date | The value to be replaced.                         | No default | Yes      |
| `replacement` | text/number/date | The value to replace with.                        | No default | Yes      |

### Output Concepts

| Concept | Description        |
| ------- | ------------------ |
| `table` | The updated table. |

### Examples

#### 1. Replace Values in a Specific Column of a Sample Table

{% tabs %}
{% tab title="Automation" %}

```
create a sample table
replace "San Jose" in the table's "City" column where
    the replacement is "Charlotte"
```

{% endtab %}

{% tab title="Results" %}

| Name          | Number             | Address          | City          |
| ------------- | ------------------ | ---------------- | ------------- |
| john          | + 1 (415) 691 9426 | 123 east street  | San Francisco |
| joe           | + 1 (415) 691 1234 | 321 west street  | Charlotte     |
| jack          | + 1 (415) 691 4595 | 213 north street | San Francisco |
| {% endtab %}  |                    |                  |               |
| {% endtabs %} |                    |                  |               |

#### 2. Replace Values in a Specific Column of a Sample Integer Table

{% tabs %}
{% tab title="Automation" %}

```
create an integer table
replace 300 in the table's "Max" column where
    the replacement is 150
```

{% endtab %}

{% tab title="Results" %}

| Amt           | Min | Max |
| ------------- | --- | --- |
| 100           | 10  | 150 |
| 200           | 5   | 500 |
| {% endtab %}  |     |     |
| {% endtabs %} |     |     |
