Uses the AND, OR, and NOT Boolean operators, combined with extraction commands, to refine member selections. The LINK command has been extended to span into dimension levels that are located in the Hybrid Analysis portion of an Essbase cube.
Syntax
<LINK (extractionCommand [operator extractionCommand])
Parameter | Description |
---|---|
extractionCommand | Any of the following extraction commands or another AND/OR expression: <ALLINSAMEDIM (member) <ALLSIBLINGS (member) <ANCESTORS (member) <CHILDREN (member) <DESCENDANTS (member [, gen/levelName [, AT|UPTO]]) <DIMBOTTOM (member) <DIMTOP (member) <IANCESTORS (member) <ICHILDREN (member) <IDESCENDANTS (member [, gen/levelName [, AT|UPTO]]) <IPARENT (member) <MATCH (Dimension, match_string) <MEMBER (member) <OFSAMEGEN (member) <ONSAMELEVELAS (member) <PARENT (member) <UDA (Dimension, UDA_name) |
Operator | Any of the following Boolean operators:
|
Notes
NOT can only be associated with an extraction command, and does not apply to the entire expression. You must use NOT in conjunction with either the AND or OR operators.
The MEMBER extraction command is only used within a LINK expression; you can use the MEMBER selection to select a single member. Do not use the MEMBER command outside of a LINK expression.
You must select members from the same dimension, and all extraction command arguments must be enclosed in parentheses, as in the example above.
Essbase evaluates operators from left to right. Use parentheses to group the expressions. For example: A OR B AND C is the same as ((A OR B) AND C). In the first expression Essbase evaluates the expression from left to right, evaluating A OR B before evaluating AND C. In the second expression, Essbase evaluates the sub-expression in parentheses (A OR B) before the whole expression, producing the same result. However, if you use (A OR (B AND C)), Essbase evaluates the sub-expression in parentheses (B AND C) before the whole expression, producing a different result.
You can include up to 50 arguments in a LINK statement. For example, <LINK (A OR B OR (C AND D)) counts as four separate arguments.
All extraction commands within a LINK statement need to select from the same dimensions; a command such as LINK (<ICHILDREN (east) AND <LEV (product,0)) causes a syntax error.
The LINK command also retrieves members located in the Hybrid Analysis portion of an Essbase database. When used in conjunction with <DIMBOTTOM for a Hybrid Analysis-enabled dimension for reports accessing data at the relational level, <DIMBOTTOM adds the bottom members in a relational source only.
If the LINK command returns an empty set of members, nothing is returned.
On Teradata ODBC driver version 3.0.2, using the LINK command to access Hybrid Analysis members does not work if the command uses more than one AND or OR operator. Teradata ODBC driver versions 2.7 or 3.0.3 have no issue.
Example
<LINK (<UDA(product,Sweet) AND <LEV(product,0))
Selects all level 0 products that are sweet.
<LINK ((<IDESCENDANTS("100") AND <UDA(product,Sweet)) OR <LEV(product, 0))
Selects sweet products from the "100" sub-tree plus all level 0 products.
<LINK ((<IDESCENDANTS("100") AND NOT <UDA(product, Sweet)) OR <LEV(product, 0))
Selects non sweet products from the "100" sub-tree plus all level 0 products.
See Also