Create offline cube files (.cub) with OlapCube. Download Now!

table of contents


Returns the first specified number of elements in a set.


Head(«Set»[, «Numeric Expression»])


This function returns the first «Numeric Expression» elements in a set. The order of elements is preserved. The default value of «Numeric Expression» is 1. If «Numeric Expression» is less than 1, the empty set is returned. If «Numeric Expression» exceeds the number of tuples in the set, the original set is returned.


The following example returns the set {USA, Canada, France}:

Head({USA, Canada, France, Germany, Japan}, 3)