Merge Drillholes
The same tool is available on the Grade Copilot tab, in the Composite group.
To perform the merge, the function uses the Hole identifier as the key field and, in the case of an Interval target file, qualifies the match using the From and To fields in the source and target files. Each time it finds a matching record it copies values from fields in the source field to fields in the target file. A Match parameter is used to control which interval will be merged to the target file.
If the target file is an Event file, the Match parameter is disabled. Instead, a match is identified when a Depth in the Event file falls within an interval in the source file.
When an event (Depth) occurs at an interval boundary (i.e. where the FROM value of an interval is equal to the previous TO value), the Depth value will be matched to the interval in which Depth is greater than the FROM value and less than or equal to the TO value.
It is up to you to map the fields in the source file to those in the target file. If the fields you want to merge are not present in the target file, you must create them.
The function can write user-defined values for 10 fields in the target file when a record is merged. There are a number of uses for this feature. One is to indicate, or “flag”, a successful merge. Another is to record the name of the source file from where values have been merged, for example, when merging from a number of lithology or assay files into a single Assay file.
Source
Interval target file
Double-click (or click on the Select icon) to select the name and type of the Interval file containing the data you want to append to, or merge with, another file. Optionally, define a filter to selectively control which records will be processed.
Double-click to select the names of the Hole, From and To fields in the file.
Merge Fields
Click the Merge Fields button and enter the names of fields in the source file that contain data you want to merge to the target file.
Target file Merge fields are automatically created and populated if they are left blank.
Match
If the target file is an Event file, the Match parameter is disabled.
When the source and target files are Interval files, the Match parameter controls which interval values in the source file will be merged. When the intervals in the source and target file are the same, the setting for Match is insignificant. However, when there is more than one interval in the source file for each interval in the target file, the Match parameter setting becomes significant. See: Matching Intervals
LONGEST | The length of the Source file intervals within the Target file interval, are compared and values from the longest of those intervals are merged. |
FIRST | Values from the first interval in the Source file that includes any part of the Target file interval are merged. |
LAST | Values from the last interval in the Source file that includes any part of the Target file interval are merged. |
MIDDLE | Values from the interval that includes the middle value of the Target file interval are merged. |
Overwrite target field
Select this option to overwrite the values in the target field. When this option is selected, the Add, Replicate One, and Replicate Many commands will overwrite the data in the target file.
Clear target fields
Select this option to clear all fields in the target file before running the Merge process.
Target
You can merge the intervals in the source file to the intervals in an Interval file, or to the events in an Event file. To modify the structure of the target file, position the cursor in the target file response, right-click, and then select Modify (F6) from the right-click menu.
Interval file
Double-click (or click on the Select icon) to select the name and type of an Interval file to which data will be appended or merged. Optionally, define a filter to selectively control which records will be processed.
Double-click to select the names of the Hole, From and To fields in the file.
Event file
Double-click (or click on the Select icon) to select the name and type of an Event file to which data will be appended or merged. Optionally, define a filter to selectively control which records will be processed.
Double-click to select the names of the Hole and Depth fields in the file.
Flag merged records
Select the Flag merged records option to write user defined values to one or more fields in the Target file, for all records modified by the Merge process.
Click the More button to open a dialog containing Merge Value and Field Name inputs. Double-click to select each field and enter a value alongside the field name you have selected.
Target file Flag fields are automatically created and populated if they are left blank.
Forms
Click the Forms button to select and open a saved form set, or if a form set has been loaded, save the current form set.
Run
Click the Run button to run the function. A message box will appear indicating how many records have been successfully merged for each field in the target file.