由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - MDX Cube
相关主题
誰來幫我開來開悄? Interesting SQL queryWhat is a relational table?
用SSIS EXPORT 到 EXCEL 2010 有2000个COLUMN,可能吗Help on Sql server huge table performance
like in sqlPlease Help! ORA-00918: column ambiguously defined
急问 hibernate queryRookie's question again
SSAS Cubesql server 面试题 (9)
求助,oracle里怎么实现这个转化Help! A cluster method in SQL
关于SSAS的问题Like 和 equal 啥区别?
一个ETL process 里边 change data capture 的问题, 大家讨论random error for CAST( MONEY AS VARCHAR)
相关话题的讨论汇总
话题: customer话题: type话题: status话题: name话题: dimension
进入Database版参与讨论
1 (共1页)
A*******n
发帖数: 625
1
请教一个问题,like:
CubeName (Invoice)
Dimension Name (CustomerName, CustomerTypeStatus,.....)
Measure (Amt)
------
CustomerName (CustKey,CustName,CustNo)
CustomerTypeStatus (Type, status)
tables的关系是(4 tables):
InvoiceDetail-->Invoice-->Customer
InvoiceDetail-->Category
CustomerName和CustomerTypeStatus 的数据都来自于Customer,在sql server 2000没
什么问题,可是在2008就有问题,当我run query的时候:
SELECT { [Customer Type Status].[All Customer Type Status].[C],
[Customer Type Status].[All Customer Type Status].[O],
[Customer Type Status].[All Customer Type Status].[R] } ON COLUMNS ,
{ [Customer Name].[All Customer Name].[#],
[Customer Name].[All Customer Name].[#].[#1 HAIR SALON (60538)] } ON ROWS
FROM [Invoice]
结果就乱了。
我记的在SQL Server BIDS 2008打开cube-->Dimension Usage,如果dimension 和
measure groups没有直接关系的话,结果就不对是不是?
各位老大给点意见,谢谢了。
g***l
发帖数: 18555
2
我是初学的,我觉得这个CUBE应该有两个DIMENSION吧,一个是CUSTOMER,一个是ORDER(
或者INVOICE),ORDER DETAIL在ORDER下面,可以做成SNOWFLAKE,或者把ORDR HEADER+
DETAIL做成一个,STAR SCHEMA,你的DIMENSION NAME看着很怪异Dimension Name (
CustomerName, CustomerTypeStatus,.....)
A*******n
发帖数: 625
3
你也觉的怪吧,这是其他人在N年前做的,是sql server 2000的,
Dimensions include:
1.Customer Name
1.1 Cust Key
1.2 Cust Name
1.3 Cust No
2. Customer Type Status
2.1 Cust Type
2.2 Cust Status
还有几个dimensions,先用这2个,
SELECT { [Customer Type Status].[All Customer Type Status].[C],
[Customer Type Status].[All Customer Type Status].[O],
[Customer Type Status].[All Customer Type Status].[R] } ON COLUMNS ,
{ [Customer Name].[All Customer Name].[#],
[Customer Name].[All Customer Name].[#].[#1 HAIR SALON (60538)] } ON ROWS
FROM [Invoice]
结果就是
C O R
# 469.74
#1 HAIR SALON (60538) 469.74
可是在2008就乱了,全是同样的值。 都是同样的值我想是因为dimension(Customer
Name,Customer Type Status)和 measure没直接的关系,可是为什么在2000里面就没什
么问题呢
g***l
发帖数: 18555
4
设计根本就不对,出的值是对的也是瞎蒙的。CUSTOMER就是一个DIMENSION,STATUS要
并到CUSTOMER里去,QUERY的结果跟你的CUBE设计关系很大,设计不好QUERY很容易出错
的,可能是升级的时候RELATIONSHIP丢失了

【在 A*******n 的大作中提到】
: 你也觉的怪吧,这是其他人在N年前做的,是sql server 2000的,
: Dimensions include:
: 1.Customer Name
: 1.1 Cust Key
: 1.2 Cust Name
: 1.3 Cust No
: 2. Customer Type Status
: 2.1 Cust Type
: 2.2 Cust Status
: 还有几个dimensions,先用这2个,

i*****w
发帖数: 75
5
In Analysis Services 2000, most references follow the pattern of dimension.
level, in AS 2005, most references follow the pattern of dimension.hierarchy
.level
When you see all have the same value, that means the data (fact and
dimension) were not related (not sliced by the dimension at all), so SSAS
uses the default member for those dimensions, which is the "ALL" level.

【在 A*******n 的大作中提到】
: 请教一个问题,like:
: CubeName (Invoice)
: Dimension Name (CustomerName, CustomerTypeStatus,.....)
: Measure (Amt)
: ------
: CustomerName (CustKey,CustName,CustNo)
: CustomerTypeStatus (Type, status)
: tables的关系是(4 tables):
: InvoiceDetail-->Invoice-->Customer
: InvoiceDetail-->Category

1 (共1页)
进入Database版参与讨论
相关主题
random error for CAST( MONEY AS VARCHAR)SSAS Cube
这个 Oracle SQL 语句该这么写啊?求助,oracle里怎么实现这个转化
How to split a column into several rows?关于SSAS的问题
SQL find distinct values in large table一个ETL process 里边 change data capture 的问题, 大家讨论
誰來幫我開來開悄? Interesting SQL queryWhat is a relational table?
用SSIS EXPORT 到 EXCEL 2010 有2000个COLUMN,可能吗Help on Sql server huge table performance
like in sqlPlease Help! ORA-00918: column ambiguously defined
急问 hibernate queryRookie's question again
相关话题的讨论汇总
话题: customer话题: type话题: status话题: name话题: dimension