goldnet

导航

SQL Server 2005 在MDX中的新特性

SQL Server 2005 MDX的核心概念
– 多维数据集不再是属性层次的结果(Product)
• 维度成员属性不单独存在多维数据集:
– There are no Female customers named Joakim. Therefore,
the tuple (Name.Joakim, Gender.Female) does not exist.
• 查询可以请求不存在的单元格:
– 空单元格总是返回
– 这些空单元格不能写入

认为多维数据集是一个大的多维Excel工作表
• 每一个单元格数据来自潜在的数据源或公式:
– Data for leaf cells (fact data)
– 内部公式去聚合非叶子单元格( non-leaf cells )
– 用户自定义公式(MDX Script) 指定怎样计算单元
• 最后写入单元格有效(Last writer to a given cell wins )
– More on this later…

设置WHERE 子句
Select Measures.Sales…
Where (Customers.Country.USA,
Customers.Country.Canada)
– 返回美国和加拿大的销售数量
– ‘OR’关键字等效结果:
• Select <column> From <table> Where <cond1> OR <cond2>
=
• Select <set> on 0 From <cube> Where (<tuple1>, <tuple2>)

posted on 2009-07-01 11:49  金大侠  阅读(321)  评论(9编辑  收藏  举报