You can use criteria to search for and identify Archive Files that contain specific data. You can also use the same or similar criteria to select and restore a subset of data from an Archive File (that is, selection criteria).
Two types of selection criteria can be used in a Restore Process:
When running the Restore Process from the graphical user interface, you can use shortcut menu commands to apply local or global selection criteria to any Archive File listed in the Restore Request. You can also copy global selection criteria and apply it as local, modifying or adding to the copied criteria, as necessary. See Archive Files List for the Archive File(s) List.
Search or global selection criteria can be applied to several Archive Files, even if the data models are not exactly the same.
Use the Index Search Selection Criteria dialog to define search criteria for any table in any Archive File listed in the Select Archive File(s) dialog. Use the Global Selection Criteria dialog to define selection criteria for any table in any Archive File processed using the Restore Request.
The tabs on the Index Search Selection Criteria dialog and the Global Selection Criteria dialog are alike and the methods used to define search criteria are the same as those used to define global selection criteria. Although the following discussion concerns the Global Selection Criteria dialog, the information also applies to the Index Search Selection Criteria dialog as well as to the Column Criteria and SQL tabs on the Local Selection Criteria dialog.
Click the down arrow to select from an alphabetical list of all tables in all Archive Files referenced by the Restore Request or, when defining search criteria, the Select Archive File(s) dialog.
The dialog has two tabs. Use the Column Criteria tab to define selection criteria for any column in the selected table, or the SQL tab to define an SQL WHERE clause for the table.
Use the Column Criteria tab to specify criteria for one or more columns in the selected table.
Name of each column. For convenience, you can rearrange the order in which the columns are displayed by dragging the grid row number. You cannot modify column names.
Since the data model of the production database may change over time, two or more versions of a table may be represented in listed Archive Files. For example, the ORDERS table in a recent Archive File may include a column, ORDER_SALESMAN that is not present in earlier files. Thus, a superset of column names from all versions of the selected table is displayed in the dialog.
To enter selection criteria for a column, click the Operator grid cell and select an operator from the list. Enter a value in the Selection Criteria cell. The data types of values for selection criteria must be appropriate for the column and conform to SQL syntax. Any variables must be defined in the current Access Definition.
To validate selection criteria, click outside the grid row. If the criteria is invalid, a message is displayed.
For selection criteria that is more complex than can be defined on the Column Criteria tab of the Global Selection Criteria dialog, use the SQL tab of the Global Selection Criteria dialog to create an SQL WHERE clause.
For example, to select the desired rows from a table, you may need a combination of AND and OR logical operators.
Enter the SQL WHERE clause of the SELECT statement.
A list of the columns in the table. Select a column name to add it to the SQL WHERE clause, positioned ahead of the cursor.
Since the data model of the production database may change over time, two or more versions of a table may be represented in listed Archive Files. For example, the ORDERS table in a recent Archive File may include a column, ORDER_SALESMAN that is not present in earlier files. Thus, a superset of column names from all versions of the selected table is displayed in the dialog.
You can define local selection criteria for any Archive File listed in the Restore Request Editor. Local selection criteria apply to a specific Archive File only and are typically used in a unplanned Restore Process that is run from the graphical user interface.
To define local selection criteria, right-click an Archive File name in the Restore Request Editor and click Apply Local Selection Criteria in the shortcut menu. The Local Selection Criteria dialog is displayed.
The selected Archive File name and a list of tables in the file are displayed at the top of the Local Selection Criteria dialog. In many respects, the Local Selection Criteria dialog is like the Index Search Selection Criteria and Global Selection Criteria dialogs – the Column Criteria and SQL tabs on the three dialogs are exactly the same. For information about defining selection criteria or an SQL WHERE clause, refer to Define Search or Selection Criteria.
One of the main differences between the Local Selection Criteria and Global Selection Criteria dialogs is that the Local Selection Criteria dialog allows you to include variables on the Column Criteria and SQL tabs.
You can use the substitution variables specified in the current Access Definition for the Archive File. You can add, modify, or delete substitution variables for the current Archive File by browsing the Access Definition from the Restore Request Editor.
For more information about using variables, see the Common Elements Manual .
The Local Selection Criteria dialog includes a third tab, the Point and Shoot tab, which is not on the Index Search Selection Criteria or Global Selection Criteria dialog.
A Point and Shoot list consists of primary key values, in ASCII format, that are used as criteria to select Start Table rows. For a selective restore from the graphical user interface, it may be easiest or most convenient to select rows from the Start Table rather than to devise selection criteria or an SQL WHERE clause.
Use the Point and Shoot tab to select Point and Shoot options and browse, edit, or create a Point-and-Shoot list.
Name of the table designated as the Start Table in the original or a modified version of the Access Definition used to create the Archive File. To change the Start Table for the Restore Process, click from the Archive File List to open the Access Definition Editor. If the Access Definition has been modified, click from the Archive File List to open the Access Definition Editor.
Click from the menu to display the Point and Shoot Editor. Start Table rows that satisfy any selection criteria for the table are displayed. You can use the Point and Shoot Editor to select individual rows from the Archive File for restoration.
The Start Table must have a primary key for Point and Shoot to function. The process uses primary key values to identify Start Table rows to be restored. The primary key values of the selected rows are saved in the Point and Shoot list.
The following considerations apply to Restore processing using Point and Shoot lists:
The Point and Shoot Editor displays data from the Start Table in a browse window. A toolbar in the browse window allows you to select display options and menu choices that pertain to the display.
Number of rows in the Point and Shoot list that are not listed on the grid. A number greater than zero may indicate that the Default Qualifier has changed since the Point and Shoot list was created or that the Point and Shoot list includes rows that do not match current selection criteria.
The first browse window in the Point and Shoot Editor displays the Start Table rows. A grid column labeled Select provides a check box for each row. Select the check box to include the row in the Point and Shoot list. Clear the check box to retract a selection.
Joining tables is useful for inspecting segments of related data to ensure that the appropriate sets of data are selected for restoration. You can join and display rows from related tables, using the Join button on the toolbar. Rows from each joined table are displayed in a separate browse window in the dialog.
In each browse window, data can be navigated and customized using the Find, Exclude, Include, Hide, and Lock options available from the grid heading shortcut menu. (See the Common Elements Manual for additional information.)
A browse window has the following components:
In columnar format, the column names are displayed across the top of the grid and the data is displayed beneath the headings. Note that the headings for primary key column(s) are in bold typeface.
In many cases, a table is related to two or more tables, creating different paths for joining and browsing the data. Thus, you can join more than one related table to a table. When several tables are joined to a table, the joined tables are "stacked" in a single edit window, in the order in which they were joined, with the most recently joined table displayed and the other tables in the stack hidden. You can display any table in the stack and join other related tables to any table in the stack.
Only one relationship can be used in a join.
In a stack, the name of the displayed table appears in a drop-down list in the browse window. Click the arrow to display the list of tables in the stack. Select a table name from the list to display that table in the browse window.
When a stacked table is displayed, all subordinate joined tables are also displayed. When a stacked table is hidden, all subordinate joined tables are also hidden.