You are here: Menu Commands > Database > Edit > Edit table
GEOVIA Surpac

Edit table

You can use this function to modify rows of data in a database table. If you are responsible for administering the database you might use this function to make small corrections to fields that are not key fields.

CautionCaution: 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, or Survey > Stations > Edit table, or Design > Blast design > Edit > Edit table, or

  • In the Function Chooser, type EDIT TABLE, and press ENTER.
Fields on the Select Table form

Field Description
Select table name The name of the table to view.

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:

  • < less than
  • <= less than or equal to
  • > greater than
  • >= greater than or equal to
  • <> not equal to
  • = equal to
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:

  • hole_id = WRC075
  • hole_id = WRC044

Examples:

For a surveying example, to select all the survey stations with a specific status, you could add a constraint:

  • status = C

The Constraint value for this constraint is C.

To select drillholes or survey stations in a particular area, you could add three constraints:

  • y < 9010.000
  • x > 2450.000
  • z >= 705.000

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:

  • z > 149
  • z < 151
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

Rows of data are displayed 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 : Only the first 200 characters of any memo field are displayed. If the data in the field is longer than 200 characters, the last three characters in the field are set to ... which denotes that there is more in the memo field, but it cannot be displayed. Do not modify any memo field longer than 200 characters or you will lose data.

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.