Returns a subset from a set, in which the subset is a numerically specified range of tuples.
Subset ( set, index1 [,index2 ] )
set | The set from which to take tuples. |
index1 | The location of the tuple with which to begin the subset. Example: if index1 is 0, the subset begins with the first tuple of set. If a negative value, the return is an empty set. |
index2 | Optional. The count of tuples to include in the subset. If omitted, all tuples to the end of set are returned. If a negative value, the return is an empty set. If the count goes beyond the range of the input set, all tuples to the end of the set are returned. |
The first tuple of the subset is represented by index1. If index1 is 0, then the first tuple of the returned subset will be the same as the first tuple of the input set.
The following expression
Subset ({Product.Members},0)
returns the set:
{ Product, [100-10], [100-20], [100-30], [100], [200-10], [200-20], [200-30], [200-40], [200], [300-10], [300-20], [300-30], [300], [400-10], [400-20], [400-30], [400], [100-20], [200-20], [300-30], Diet }
All tuples of the set {Product.Members} are returned, because the subset is told to begin with the first tuple, and no count of tuples given for index2.
The following expression
Subset ({Product.Members},0,4)
returns the set:
{ Product, [100-10], [100-20], [100-30] }
Therefore, the following query
Select Subset ({Product.Members},0,4) on columns from sample.basic
returns the grid:
Product | 100-10 | 100-20 | 100-30 |
---|---|---|---|
105522 | 22777 | 5708 | 1983 |
©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |