The IntervalMatch prefix is used to create a table matching discrete numeric values to one or more numeric intervals, and optionally matching the values of one or several additional keys.
IntervalMatch (matchfield)(loadstatement | selectstatement )
IntervalMatch (matchfield,keyfield1 [ , keyfield2, ... keyfield5 ] ) (loadstatement | selectstatement )
The intervals may be overlapping and the discrete values will be linked to all matching intervals.
In order to avoid undefined interval limits being disregarded, it may be necessary to allow
||The field containing the discrete numeric values to be linked to intervals.|
||Fields that contain the additional attributes that are to be matched in the transformation.|
||Must result in a table, where the first field contains the lower limit of each interval, the second field contains the upper limit of each interval, and in the case of using key matching, the third and any subsequent fields contain the keyfield(s) present in the IntervalMatch statement. The intervals are always closed, i.e. the end points are included in the interval. Non-numeric limits render the interval to be disregarded (undefined).|
In the two tables below, the first one lists a number of discrete events and the second one defines the start and end times for the production of different orders. By means of the IntervalMatch prefix it is possible to logically connect the two tables in order to find out e.g. which orders were affected by disturbances and which orders were processed by which shifts.
The table OrderLog contains now an additional column: Time. The number of records is also expanded.
Example 2: (using
Same example than above, adding ProductionLine as a key field.
A table box could now be created as below:
|0||Start of shift 1||-||-||-|
|P2||01:00||0||Start of shift 1||-||-||-|
|P1||02:23||2||Line restart 50%||A||01:00||03:35|
|P1||04:15||3||Line speed 100%||B||02:30||07:58|
|P1||04:15||3||Line speed 100%||C||03:04||10:27|
|P1||08:00||4||Start of shift 2||C||03:04||10:27|
|P2||09:00||4||Start of shift 2||D||07:23||11:43|
|P1||11:43||5||End of production||-||-||-|
|P2||11:43||5||End of production||D||07:23||11:43|