Merge tables
Concept Information
Using a common key field from each table, you can merge two sorted Analytics tables with identical record structures into a new third table that uses the same sort order as the original tables.
Note
To successfully merge tables, the data in both tables must be exactly identical in structure. For more information, see Merging tables.
Steps
- In the Navigator, open the primary table, and right-click the secondary table
and select Open as Secondary.
The primary and secondary table icons update with the numbers 1 and 2 to indicate their relation to each other .
- Select .
- On the Main tab:
- Select the primary key field from the Primary Keys list.
- Select the secondary key field from the Secondary Keys list.
- In the To text box, specify the name of the new, merged table.
- On the More tab:
- (Optional) To specify that only a subset of records are processed, select one of the options in the Scope panel.
- Click OK.
Merge dialog box options
The tables below provide detailed information about the options in the Merge dialog box.
Main tab
Options – Merge dialog box | Description |
---|---|
Secondary Table | An alternate method for selecting the secondary table. |
Primary Keys Secondary Keys |
Specifies the common key field to use to merge the two tables.
Key field guidelines:
|
Presort Primary Table |
Sorts the primary table by the key field, or fields.
|
Local |
If you are connected to a server table, specifies where to save the merged table.
|
Use Output Table | Specifies whether the Analytics table containing the output results opens automatically upon completion of the operation. |
If |
(Optional) Allows you to create a condition to exclude records from processing.
|
To | Specifies the name and location of the output table.
Regardless of where you save the output table, it is added to the open project if it is not already in the project. If Analytics prefills a table name, you can accept the prefilled name, or change it. |
More tab
Options – Merge dialog box | Description |
---|---|
Scope panel | Specifies which records in the primary table are processed:
Note The number of records specified in the First or Next options references either the physical or the indexed order of records in a table, and disregards any filtering or quick sorting applied to the view. However, results of analytical operations respect any filtering. If a view is quick sorted, Next behaves like First. |
Append To Existing File | Specifies that the output results are appended (added) to the end of
an existing Analytics table. Note Leaving Append To Existing File deselected is recommended if you are uncertain whether the output results and the existing table have an identical data structure. For more information about appending and data structure, see Appending output results to an existing table. |
OK | Executes the operation. If the overwrite prompt appears, select the appropriate option. If you are expecting the Append option to appear and it does not, click No to cancel the operation and see Appending output results to an existing table. |