1.
It is not an error to put the same member on both sides of the colon; you will just get a range of one member.
在冒号(:)两边放置同一个成员不会出错,得到的仅仅是一个成员。
2.
In Analysis Services, regardless of whether the member on the left of the colon is before or after the member on the right in terms of database ordering, the set that results will have all members between the two in database ordering. That is, the following two return exactly the same set:
{[Time].[April-2001] : [Time].[January-2001]}
{[Time].[January-2001] : [Time].[April-2001]}
在AS中,无需考虑冒号两边的成员的在Database中的顺序,只需考虑冒号两边的成员在同一个level,返回的这两个Member之间包括这两个Member的集合。
3.
In Analysis Services, hierarchies behave like dimensions, and multiple
dimensions have different sets of members. As a result, in an Analysis Services
dimension that contains multiple hierarchies, you cannot simply request
[Dimension].Members. If you do, it will complain of an unknown dimension.
For example, given a logical [Time] dimension that contains two hierarchies,
[Time].[Fiscal] and [Time].[Calendar], a client taking metadata from
OLE DB for OLAP will see one time dimension. However, the expression
[Time].Members will result in an error rather than result in all members on
all time hierarchies. To obtain a set of members, the client must request either
[Time].[Fiscal].Members or [Time].[Calendar].Members. If the
dimension has only one hierarchy and that hierarchy does not have an explicit
name, then [Dimension].Members will work. For example, if time has only
one hierarchy, then [Time].Members will work.
4.
SELECT
{ [Product].[Tools], [Product].[Toys] } ON COLUMNS,
Descendants (
[Time].[2005],
[Time].[Month],
SELF
)
ON ROWS
FROM Sales
WHERE [Measures].[Dollar Sales]
SELECT
{ [Product].[Tools], [Product].[Toys] } ON COLUMNS,
Descendants (
[Time].[2005],
[Time].[Month],
SELF_AND_BEFORE
)
ON ROWS
FROM Sales
WHERE [Measures].[Dollar Sales]
5.
You can always put a single member within parentheses, but it’s not
required if the tuple is defined by just that member. However, the following is
not valid because it has two time members in it:
([Customer].[
6.
The “dimensionality” of a tuple refers to the set of dimensions whose members
compose it. The order in which dimensions appear in a tuple is an important
part of a tuple’s dimensionality. Any and all dimensions can be part of a
tuple, including members of the measures dimension.
7.
Depending on the context in which a set is
used, it either refers to that set of tuples or to the value(s) in the cell(s) that its
tuples specify
8.
Although a single member is by default a tuple of one dimension, a set that
has only one tuple is not equivalent to a tuple. As far as standard MDX is concerned,
the following two examples are quite different:
([Time].[2001 Week 1], [Product].[HyperGizmos])
{ ([Time].[2001 Week 1], [Product].[HyperGizmos]) }
The first of these is a tuple, and the second is a set containing that tuple. You
might think it reasonable that wherever a set is called for, you can use a single tuple and it will be interpreted as a set of one. Analysis Services 2005 can make use of tuples or members in some contexts that otherwise ask for a set. For other servers, you will need to wrap the tuple in curly braces as in the second sample just given. Hence, the following is a valid query only for Analysis Services 2005 (it needs braces around the tuple to be valid otherwise):
SELECT
([Time].[Jun, 2005], [Geography].[
FROM [Sales]
WHERE ([Measures].[Dollar Costs])
The following is valid across all MDX providers:
SELECT
{ ([Time].[Jun, 2005], [Geography].[
