Create field and delete field
Create field
With this function, you can add a field to a table.
Prerequisites: A database is open.
To run this function: Choose Survey > Survey database > Administration > Create field, or Database > Database > Administration > Create field, or Design > Blast design > Database > Administration > Create field, or...
Fields on the Add fields to table form
| Field | Description |
|---|---|
| Define optional fields for | The name of the table in which to create the field. |
| Name | The name of the field to create. Names must start with a letter, and contain only letters, numbers and underscore characters. |
| Type |
Enter the field type for the data which is to be stored in the field. Valid entries are:
|
| Nulls | Whether or not nulls are allowed in the field. For a character field, storing a blank is equivalent to a NULL. For a numeric field, storing blanks causes a ZERO to be stored in the field. |
| Length | The length of the field in which the data is to be stored. Length should be large enough to include the decimal point and decimal places when the field type is real. |
| No Dec | The number of decimal places to be stored. No Dec is necessary only if the field type is real. |
| Case |
The case of characters which are required for the field. This is necessary only if the field type is character. Valid entries are:
|
| Low Bound | For numeric fields, the minimum value you can enter. |
| High Bound | For numeric fields, the maximum value you can enter. |
| Valid Entries |
You can use this field to limit the character data that people can enter to a predefined set of values. Each separate value must be separated by a semi-colon, for example ";OVB;GRA" If you have a large number of values, it is better to enter them into the translation table as described here. The valid entries are designated as stored in the translation table by entering the "@" symbol followed by the field name in the translation table which contains the permitted values. If the valid entries are stored in the translation table, you must enter "@(translation table field name) here to tell the system to look in the translation table when validating input for this field. |
| Phys, Virt, or Exp |
You must indicate whether physical data is stored in this field, or whether the field is a virtual field which contains a function for translating values from an associated physical field.
Any field in which you wish to store data must be defined as a physical field, that is, data is physically stored in the field. See the explanation regarding physical and virtual fields. A virtual field has no space reserved in the database table for it. Instead a special translation function is defined to convert internally stored values to a preferred value for display purposes. This permits you to enter an algebraic expression using field names in the database table as variables to derive a suitable value at the time a value is retrieved from the field. |
| Reference field or Expression |
If the field is a virtual field, you must enter the name of the reference field from which values are to be extracted before translation by the function associated with this field. If the field is an expression, enter the expression. |
Output
The new field is created in the table you specified.
Delete field
You can use this function to delete optional fields from a table. It is not possible to delete a mandatory field.
Prerequisites: A database is open.
To run this function: Choose Survey > Survey database > Administration > Delete field, or Database > Database > Administration > Delete field, or Design > Blast design > Database > Administration > Delete field or...
- In the Function Chooser, type DB DELETE FIELD, and press ENTER.
Fields on the Delete fields form
| Field | Description |
|---|---|
| Table | The table that contains the field to delete. |
| Field Name |
The field to delete. When you select a table, Field Name is filled with the list of optional fields in that table.
|
Output
The field or fields you selected are deleted from the database.
Messages