Edit table
You can use this function to modify rows of data in a database table, and constrain the results to specific rows. If you are responsible for administering the database you might use this function to make small corrections to fields that are not key fields.
Caution: By using this function you are modifying the data in the database directly. GEOVIA recommends you back up your database before using this function except for small changes when you completely understand the schema of your database.
Prerequisites: A database is open.
To run this function: Select Database > Edit > Edit table constrained, or Survey > Stations > Edit table constrained, or Design > Blast design > Edit > Edit table constrained, or
- In the Function Chooser, type EDIT TABLE ROW, and press ENTER.
Fields on the Select the database table to process form
| Field | Description |
|---|---|
| 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.
The cells with a grey background are read-only. If you edit a cell with a white background and click Apply, the data is changed.
Note : Memo fields are read-only because only the first 200 characters of any memo field are displayed. If you were able to edit the memo field using this function, characters after the 200th character would be lost.
Validation
If the data does not pass a validation rule, the update operation on the table is terminated and the row which is causing the problem is displayed as the first row on the form. All rows before this row on the form are successfully saved to the table when this occurs. This gives you the opportunity to correct the data or to abort the remainder of the edit operation.
Tip: Look at the Message window. If the data has not been updated because it did not pass a validation rule, a message is displayed.
Messages