Opening multiple tables

You can have multiple tables open simultaneously in Analytics, which provides a convenient method for visually comparing two or more sets of data. To make comparisons easier, you can apply filtering and quick sorting to the open tables, and the results of these operations are preserved as you switch between tables. Opening multiple tables is an interface-only feature, and does not apply to Analytics scripting.

To open multiple tables in Analytics you pin the View tab for a table you want to keep open, and then open one or more additional tables. You keep any of the additional tables open by also pinning them. If a table is not pinned, it closes automatically whenever you open another table.

An additional View tab opens for each additional table you open. You can switch between tables by clicking the individual View tabs, or by clicking the table name in the Navigator. The table currently selected for display is the active table and the active table name appears in bold on the View tab and in the Navigator.

Steps

You can open multiple tables simultaneously in Analytics. Each table appears in a separate View tab, allowing you to switch back and forth between different tables. The tables must all be contained in the same Analytics project.

  1. In the Navigator, double-click the first table to open it.
  2. Click the pin icon to pin the View tab.
  3. Open one or more additional tables and click the pin icon for each table before opening the next table.

    To move back and forth between tables, click the individual View tabs, or click the table name in the Navigator, where open tables are indicated with a green dot . The name of the active table (currently displayed table) appears in bold in the Navigator.

  4. To close a pinned table, click on the appropriate View tab.
  5. To close all open tables, click Close All Tabs to the right of the View tabs.

The benefit of opening multiple tables

The general benefit of being able to open multiple tables simultaneously is that in some circumstances you can perform useful analysis without being required to first process the tables using Analytics operations such as joining or relating.

For example, consider a review of T&E transactions for banned vendors (or suspicious merchant category codes). You have two tables, one containing T&E transactions, and another containing banned vendors. You could join the two tables on vendor name, an operation that could require a lot of preliminary work to manually harmonize the two key fields before performing the join. Or you could open both tables, and using the banned vendor list as a reference, create filters in the transactions table that isolate any occurrences of the banned vendors. If appropriate, you could build a fuzzy search component into the filtering of the T&E transactions. The filters below provide two examples:

  • ISFUZZYDUP(vendor_name,"Diamond Casino", 5, 99) isolates exact occurrences and fuzzy duplicates of Diamond Casino.
  • MATCH(mc_code, "7298", "7995", "9222") isolates exact occurrences of merchant category codes 7298 (Health and Beauty Spas), 7995 (Betting), and 9222 (Fines).

For more information, see ISFUZZYDUP( ) function and MATCH( ) function.

Additional information about opening multiple tables

Functional area

Details

General table behavior

Tables behave the same way whether only one table is open, or multiple tables are open.

Table state preserved

The state of each table is preserved as you switch between tables. Table state includes the following elements:

  • filtering
  • quick sorting
  • record selection
  • column, record, or field highlighting
  • scroll bar position
  • active view selection
  • active index selection

Analytics operations

Analytics operations are performed on the active table only.

Closing the View tab and closing tables

  • Closing the View tab containing a table also closes the table. You cannot perform any operations on a closed table.

    Prior to version 10.0 of Analytics, closing the View tab removed the table data from view, however the table remained in an open state and you could continue to perform operations on the data.

Primary and secondary tables

(Applies to the Analytics interface only, including the command line. Does not apply to Analytics scripting.)

  • One or more open tables can be primary tables with associated secondary tables. Each primary-secondary association is unique and has no effect on any other primary-secondary association.
  • Different primary tables can have the same secondary table.
  • A table that is open in the View tab cannot be opened as a secondary table. It must first be closed before being opened as a secondary table.
  • A table open as a secondary table cannot be opened in the View tab. It must first be closed before being opened in the View tab.

    Note

    Opening a secondary table means associating it with a primary table and making it available for processing. Secondary tables are not opened in the View tab.

  • Unassociated or ‘free-floating’ secondary tables are not permitted:
    • If you close a primary table, the associated secondary table is automatically closed.
    • Another table must already be open before you can open a table as secondary.
    • This restriction does not apply to Analytics scripting, which still allows unassociated secondary tables.

Analytics projects

Multiple open tables must all be contained in the same Analytics project.

If an Analytics project has multiple tables open when you close the project, only the active table is automatically opened when you reopen the project. The open state of the other tables, and any primary-secondary associations, are not preserved.

Server tables

Multiple-table mode is supported for local tables only. You cannot open more than one server table at a time. If you have one or more local tables open when you open a server table, all the local tables are automatically closed.

Analytics command log

In multiple-table mode, every time you switch to a different table and perform an action or an operation on the table that causes an entry to be written to the Analytics command log, the log entry is preceded by an OPEN <table name> log entry. When multiple tables are open, this preceding log entry identifies which table is the target of an operation.

Pinning a table, or switching between tables without performing any subsequent operation, does not create a log entry.

Data Definition Wizard

When you use the Data Definition Wizard to import data and define a table all open tables, whether pinned or not, are automatically closed. Closing all open tables ensures that a table can be overwritten, if necessary.

Running the IMPORT command from the command line does not close any open tables. If you attempt to overwrite a table using this method, and the table is open and active, the command fails and an error message appears.

Scripting

  • You cannot open multiple tables using an Analytics script. Multiple-table mode is an interface-only feature and does not have an equivalent in ACLScript.
  • Pinning a table to keep it open in the Analytics interface does not prevent the table from being closed with the CLOSE command.
  • When you run an Analytics script, all open tables, whether pinned or not, are automatically closed. The active table, and an associated secondary table, if one exists, are then automatically reopened, unless the script specifies opening a different table.

    Automatically reopening the active table and any associated secondary table supports the use of scripts that assume manually opening a table prior to running a script.