UNGROUP( recordset [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] )
recordset | The set of previously GROUPed records. |
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: | UNGROUP returns a record set. |
The UNGROUP function removes previous grouping. This is equivalent to using the GROUP function without a second parameter.
Example:
MyRec := RECORD STRING20 Last; STRING20 First; END; SortedSet := SORT(Person,Person.last_name); //sort by last name GroupedSet := GROUP(SortedSet,last_name); //then group them SecondSort := SORT(GroupedSet,Person.first_name); //sorts by first name within each last name group // this is a "sort within group" UnGroupedSet := UNGROUP(GroupedSet); //ungroup the dataset
See Also: GROUP