# Add

The Add prefix can be added to any LOAD or SELECT statement in the script to specify that it should add records to another table. It also specifies that this statement should be run in a partial reload. The Add prefix can also be used in a Map statement.

Information noteFor partial reload to work properly, the app must be opened with data before a partial reload is triggered.

Perform a partial reload using the Reload button. For more information, see [Button](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Visualizations/Button/button.htm). You can also use the Qlik Engine JSON API.

Syntax:

Add [only] [Concatenate[(tablename)]] (loadstatement | selectstatement)

Add [only] mapstatement

During a normal (non-partial) reload, the Add LOAD construction will work as a normal LOAD statement. Records will be generated and stored in a table.

If the Concatenate prefix is used, or if there exists a table with the same set of fields, the records will be appended to the relevant existing table. Otherwise, the Add LOAD construction will create a new table.

A partial reload will do the same. The only difference is that the Add LOAD construction will never create a new table. There always exists a relevant table from the previous script execution to which the records should be appended.

No check for duplicates is performed. Therefore, a statement using the Add prefix will often include either a distinct qualifier or a where clause guarding duplicates.

The Add Map...Using statement causes mapping to take place also during partial script execution.

Arguments:

Arguments

| Argument | Description |
| --- | --- |
| only | An optional qualifier denoting that the statement should be executed only during partial reloads. It should be disregarded during normal (non-partial) reloads. |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/Add.htm)

#### Examples and results:

| Example | Result |
| --- | --- |
| `Tab1:`<br>`LOAD Name, Number FROM Persons.csv;`<br>`Add LOAD Name, Number FROM newPersons.csv;` | During normal reload, data is loaded from<br>Persons.csv and stored in the Qlik Sense table Tab1.<br>Data from NewPersons.csv is then concatenated to the same Qlik Sense table.<br><br>During partial reload, data is loaded from NewPersons.csv<br>and appended to the Qlik Sense table Tab1.<br>No check for duplicates is made. |
| `Tab1:`<br>`SQL SELECT Name, Number FROM Persons.csv;`<br>`Add LOAD Name, Number FROM NewPersons.csv where not exists(Name);` | A check for duplicates is made by means of looking if Name exists in the previously loaded table data.<br><br>[Exists - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/Exists.htm)<br><br>During normal reload, data is loaded from Persons.csv<br>and stored in the Qlik Sense table Tab1. Data from NewPersons.csv is then concatenated to the same Qlik Sense table.<br><br>During partial reload, data is loaded from NewPersons.csv<br>which is appended to the Qlik Sense table Tab1. A check for duplicates is made by means of seeing if Name<br>exists in the previously loaded table data. |
| `Tab1:`<br>`LOAD Name, Number FROM  Persons.csv;`<br>`Add Only LOAD Name, Number FROM NewPersons.csv where not exists(Name);` | During normal reload, data is loaded from Persons.csv<br>and stored in the Qlik Sense table Tab1. The statement loading NewPersons.csv<br>is disregarded.<br><br>During partial reload, data is loaded from NewPersons.csv<br>which is appended to the Qlik Sense table Tab1.<br>A check for duplicates is made by means of seeing if Name<br>exists in the previously loaded table data.<br><br>[Exists - script function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/Exists.htm) |

## Learn more

* [Partial reload](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/PartialReload.htm)
* [Load](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Load.htm)
* [Concatenate](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/concatenate.htm)
* [Map](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Map.htm)
* [Only](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/Only.htm)