View table constrained
You can use this function to view, but not modify, rows of data in a database table, and constrain the results to specific rows. This function is useful if you are displaying data from the database in Graphics and the data is not displayed as you expected.
Prerequisites: A database is open.
To run this function: Select Database > Edit > View table constrained, or Survey > Stations > View table constrained, or Design > Blast design > Edit > View table constrained, or
- In the Function Chooser, type VIEW TABLE ROW, and press ENTER.
Fields on the Select the database table to process form
| Field | Description |
|---|---|
| Select table name | The name of the table to view. |
When you click Apply, the fields in the table are listed in the following form.
Fields on the Define view/edit rows template form
| Field | Description |
|---|---|
| Table name | Read-only. The name of the table you opened. |
| Field Name | This section shows each of the fields for which data will be displayed. Right-click on the column on the left to remove or add fields. You can also change the order in which fields are displayed using the drop-down list buttons in each cell. |
When you click Apply, the Define Query Constraints form is displayed. You can enter up to 17 constraints.
Fields on the Define Query Constraints form
| Field | Description |
|---|---|
| Table name | Read only. The name of the table you opened is displayed at the top of the form. |
| Field name | The name of the field on which you want to impose a constraint. If you leave Field name blank, all records in the table are selected. |
| Operand |
The mathematical operation that defines the constraint. The operands are:
|
| Constraint Value |
The value for the constraint. Press TAB to add a second row, or right-click in the left column to add or remove constraint rows. When you have multiple constraint rows, Surpac returns only the records that pass all the constraints. The only exception is that you can you use the hole_id field and the = operator to return multiple rows — in that situation, an OR operator is used between the two constraints. For example, the following constraint would return two records:
Examples: For a surveying example, to select all the survey stations with a specific status, you could add a constraint:
The Constraint value for this constraint is C. To select drillholes or survey stations in a particular area, you could add three constraints:
To select all of the holes where the collar is on a specific bench of an open pit, you could enter two constraints like these:
|
| Load | Loads a constraint from the .dbc file you choose. Be aware that a set of constraints is normally suitable for only the table on which it was created, or on tables that have the same or a very similar structure. |
| Save | Saves the constraint to a .dbc file so you can reload it later. |
Output
When you click Apply in the final form, the View/Edit table rows form is displayed. This form displays rows of data from the table you chose. The maximum number of rows displayed is 200.