COMBINE( leftrecset, rightrecset [, transform ][,LOCAL])
COMBINE( leftrecset, rightrecset, GROUP , transform [,LOCAL] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] )
leftrecset | The LEFT record set. |
rightrecset | The RIGHT record set. |
transform | The TRANSFORM function call. If omitted, COMBINE returns all fields from both the leftrecset and rightrecset, with the second of any duplicate named fields removed. |
LOCAL | The LOCAL option is required when COMBINE is used on Thor (and implicit in hThor/Roxie). |
GROUP | Specifies the rightrecset has been GROUPed. If this is not the case, an error occurs. |
UNORDERED | Optional. Specifies the output record order is not significant. |
ORDERED | Specifies the significance of the output record order. |
bool | When False, specifies the output record order is not significant. When True, specifies the default output record order. |
STABLE | Optional. Specifies the input record order is significant. |
UNSTABLE | Optional. Specifies the input record order is not significant. |
PARALLEL | Optional. Try to evaluate this activity in parallel. |
numthreads | Optional. Try to evaluate this activity using numthreads threads. |
ALGORITHM | Optional. Override the algorithm used for this activity. |
name | The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. |
Return: | COMBINE returns a record set. |
The COMBINE function combines leftrecset and rightrecset on a record-by-record basis in the order in which they appear in each.
For form 1, the transform function must take at least two parameters: a LEFT record which must be in the same format as the leftrecset and a RIGHT record which must be in the same format as the rightrecset. The format of the resulting record set may be different from the inputs.
For form 2, the transform function must take at least three parameters: a LEFT record which must be in the same format as the leftrecset, a RIGHT record which must be in the same format as the rightrecset, and a ROWS(RIGHT) whose format must be a DATASET(RECORDOF(rightrecset)) parameter. The format of the resulting record set may be different from the inputs.