另一个有趣的问题出现在最近的SQL Server商业智能类:“我可以执行类似SQL的联盟MDX ?”。有一个UNION操作符但不是完全相同的,所以我们必须跳出这个盒子的……问题来自一个学生想转换一个复杂的报告针对关系数据仓库运行对多维数据集产生相同的结果。MDX与SQL非常不同,因为它是为了检索聚合使用的“细胞”措施,维度,元组和集。然而,一些结构出现类似像选择,和工会所以人们很容易尝试重新编码SQL MDX。不幸的是,它不是那么容易。事实证明MDX UNION操作符只作用于集,与SQL不能用于连接多个MDX语句产生类似的结果集。我们想出了一个解决方案是使用SQL Server报告服务。每个报告允许一个MDX语句在报告中数据集的生成使用拖放查询设计器类似于立方体浏览器。这2005年,一口气介绍了因为我们不得不从头MDX代码与2000年的版本。你甚至可以包括使用所谓的参数区域过滤虽然参数复选框隐藏在右边。 You can then switch from Design mode to MDX mode to finish the statement if you want to use some more complex operators. Once you are in MDX mode you cannot go back to Design mode but the editor warns you of this. If you can design your report in a modular fashion you can then use the SubReport construct in a parent report. Each report runs individually with the results displayed on the parent. You can pass parameters from the parent to the subreports for dynamic queries. If you hide the headers in the subreports you can effectively concatenate result sets from multiple reports. And therefore, multiple MDX queries. Clever, eh? cheers Brian
MDX联盟吗?使用Subreports……
SQL Server
版权©2009 IDG通信公司。Raybet2