Split
When you run the split function, the selected components are copied to other fields, while the source field remains unchanged.
You can use this on both numeric and text data. The point at which data is separated is determined by a number of characters or by a delimiter in the source field. Virtually any combination of characters can be used as a delimiter.
- This function is useful for splitting a drillhole sample identifier into its components. A drillhole sample identifier such as 96DDH1170-4 could have been used to identify the year of drilling, the drillhole identifier, from and to distances. This could be separated into four fields containing 96, DDH117, 0 and 4 so that drillhole logs can be constructed.
- You can also use Split to copy alphanumeric data from one field to another. In that case, enter only one field name for the destination field.
- It is possible to leave field names blank in order to indicate that part of the split is not required.
This is the only way to do a straight copy of Character type data. Numeric data can also be copied via the Calculate function.
For example, if the field to split contains values like BG1, BG2, BG3, BG4 and you want to populate a different field with only the numeric component, you can use "G" as the delimiter and leave the field for the first component of the split blank to indicate that the result is not required:
Input
File
Select a file type and enter the name of the file you want to work with. Optionally select a filter to selectively control which records will be processed.
Field to split
In the Field to split prompt, enter (or double-click to select) the name of the field that you want to split.
Overwrite data
Select the Overwrite box if required. When selected, the results will overwrite any existing values in the destination fields.
Split fields
In the group called Split fields, enter (or click on the List icon to select) the names of the fields where you want the data from the split field to be stored. Use the buttons on the local toolbar to Manage the rows in the list.
New fields will be created if they do not exist. The structure of any new fields will match the structure of the Field to split. Leave the Field Name blank when a component of the split is not required as a new field.
Length
Specify the position of the split by entering a value in the Length field.
Delimiter
Alternatively, specify the position of the split by entering a value in the Delimiter field. Use this option when the length of the data in the field to split varies.
Leave the Length and Delimiter fields blank if you want to split the file based upon a SPACE delimiter.
Overwrite data
Select the Overwrite box if required. When selected, the results will overwrite any existing values in the destination fields.