父子维度

ptlzx 2002-04-12 11:23:52
请问,要如何做象 Sql Server 2000 中的 Analysis Services 中的父子维度.实现象目录树一样的查询结果.请说的具体些吗?
...全文
163 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
ptlzx 2002-04-18
  • 打赏
  • 举报
回复
OK,先谢了.我等着
yzyun 2002-04-18
  • 打赏
  • 举报
回复
真是不好意思,最近很忙,没有能够及时回复。
忙考试呢。
下周给你回话吧。
ptlzx 2002-04-15
  • 打赏
  • 举报
回复
要如何写一个层次结构的查询,效果如下:
表:

Parent Child
---------------------------------- ----------------------------------
World Europe
World North America
Europe France
France Paris
North America United States
North America Canada
United States New York
United States Washington
New York New York City
Washington Redmond

查询结果:

World
North America
Canada
United States
Washington
Redmond
New York
New York City
Europe
France
Paris
ptlzx 2002-04-14
  • 打赏
  • 举报
回复
不好意思,我的程序和ANALYSIS SERVICES没有一点关系。我是觉得ANALYSIS SERVICES那个父子维度的显示方法不错,那来比喻一下。
我在VB.NET试了一下,好象有两种方法:1)COM组件 2).NET框架组件。前者在工具栏WEB窗体中出现TREE控件,但属性中显示的似乎和其他的控件不太一样。还有这中方法是否要在客户端也注册TREE控件。第二种方法,在自定义.NET框架组件选上TREE组件后在工具栏的WEB窗体中有找不到该控件。我要怎么使用它。是否要使用代码?还有,要怎样把它与我SQL SERVER 2000中的表绑定,实现象ANALYSIS SERVICES父子维度的记录循环连接效果。能提供这方面的代码吗?谢谢!
yzyun 2002-04-14
  • 打赏
  • 举报
回复
不知道你是通过什么访问你的数据库,数据库又是哪种。

如果你是访问你的ANALYSIS SERVICES,你肯定知道的,通过OLAP;如果你提取CUBE中的数据,倒是没有听说过什么SQL,有种和SQL稍稍类似的MDX,你肯定也知道的。我不知道用MDX是否能够取维度中的数据,我觉得是可以的,如果你知道告诉我好了。

如果你只是单纯的访问一般的关系数据库,诸如SQL SERVER、ORACLE,而并不涉及到ANALYSIS SERVICES,应该很好实现TREE的,在VB.NET中有TREE VIEW控件,ASP.NET中也应该不难,方式呢,比如提取到XML中,在用ASP绑定之(呵呵,好像绕弯了。),说实话,我并没有做过,现在我们的项目组别人负责此类工作。不过你说的无论是VB.NET还是ASP.NET中实现TREE他们都有。

说实话,我现在也不明白,你的程序到底和ANALYSIS SERVICES有没有关系。
我们继续探讨好了。
ptlzx 2002-04-13
  • 打赏
  • 举报
回复
说得对,我就是有一个表就是象你说的第二种格式:
LEI_ID NAME SHANPIN_ID
01    电器     01
0101   电视     01
010101  彩色电视   0101
02    服装     02
0201   男装     02
020101  男夏装    0201 
020102  男冬装    0201
0202   女装     02
问题是我要怎样用VB.NET做一个象ANALYSIS SERVICES中父子维度那样的目录树?象ANALYSIS SERVICES父子维度是不是有个什么SQL语句可以实现?
我是想写个WEB页程序(ASP.NET),实现一个目录树,如:点电器显示音响、电视等、再点电视就可以出现一些品牌的电视、再点出现类别型号等。点击具体的项目右边出现具体的参数和说明。
yzyun 2002-04-13
  • 打赏
  • 举报
回复

以一个商品字典表(Dic_Commodity)为例:

Dic_Commodity(第一种情况):
表结构:
CommodityID nvarchar(20)
CommodityName nvarchar(60)
price numeric(18,2)
Other nvarchar(120)
表数据:
01    电器   
0101   电视
010101  彩色电视
02    服装
0201   男装
020101  男夏装
020102  男冬装
0202   女装

Dic_Commodity(第二种情况):
表结构:
CommodityID nvarchar(20)
CommodityName nvarchar(60)
TypeID  nvarchar(20)
price numeric(18,2)
Other nvarchar(120)
表数据:
01    电器     01
0101   电视     01
010101  彩色电视   0101
02    服装     02
0201   男装     02
020101  男夏装    0201 
020102  男冬装    0201
0202   女装     02

首先你的Dic_Commodity中的记录应该存在父子关系,就象第二种情况那样,如果是第一钟

情况呢,那样就自己生成一个视图,搞成类似情况二的那样,即对于一行记录,存在在其父

级编码的列。
然后是在你的ANALYSIS SERVICES中的事情了:启动维度向导,选择父子维度,然后选择你

的表商品信息字典表(或视图),下一步,成员键是CommodityID,父键是TypeID,成员名

称是CommodityName,下一步,下一步,起名子,ok。
当然,第二种情况的CommodityID本身没有级次特征也可以,如:
1000    电器     0050
1001    电视     1000
1002    彩色电视   1001
1100    服装     0050
1101    男装     1100
1111    男夏装    1101 
1112    男冬装    1101
1105    女装     1100

…………………………………………………………
QQ:83179318
yzyun@sina.com

或许有说的不是的地方,共同学习。
Table of Contents Preface Chapter 1: Understanding and Modifying Data Sources Chapter 2: Using Essbase Studio Chapter 3: Building the BSO Cube Chapter 4: Building the ASO Cube Chapter 5: Using EAS for Development Chapter 6: Creating Calculation Scripts Chapter 7: Using MaxL to Automate Process Chapter 8: Data Integration Chapter 9: Provisioning Security Using MaxL Editor or Shared Services Chapter 10: Developing Dynamic Reports Index Preface Up Chapter 1: Understanding and Modifying Data Sources Introduction Setting up an Account or Measures dimension with a parent-child reference Setting up dimensions with a generation reference Adding columns for outline formulas Adding the solve order column to tables that have ASO formulas Adding and populating the Sort Order Column Adding tables for varying attributes Determining hierarchies in relational tables Using the Essbase Outline Extractor to extract dimensions Using Star Analytics to build your star schema from existing Essbase cubes Up Chapter 2: Using Essbase Studio Introduction Creating TBC sample database and connecting to the data source Adding user-defined tables Building your minischema Setting up joins in a minischema Adding tables to a minischema Using a text file data source Working with Common Platform Language (CPL) Using Sort Order on data elements Up Chapter 3: Building the BSO Cube Introduction Creating hierarchies using a parent-child reference table Creating hierarchies using a generation reference table Adding attribute dimensions to hierarchies Building a Calendar dimension Creating date elements Creating Alias tables Developing cube schema and an Essbase model Setting Essbase properties Deploying a cube Creating an OLAP Model in EIS Creating an OLAP metaoutline in EIS Up Chapter 4: Building the ASO Cube Introduction Using the Connection Wizard to set up an ASO cube Building a Measures dimension from the fact table Creating an ASO Cube Schema and an Essbase Model Understanding Essbase Model properties for the ASO cube Designing a drill-through report Using the View dimension for Dynamic Time Series reporting Up Chapter 5: Using EAS for Development Introduction Adding an application and database on an Essbase Server Using the outline editor to add dimensions Using dimension build rules to add the parent-child dimension Creating dimension build rules to add a base and attribute dimensions Using dimension build rules to add user-defined attributes and associate dimensions Creating load rules for flat file data loads Creating substitution variables Using If/Else logic and substitution variables in outline formulas Using Text measures on a BSO cube Using Date measures on a BSO cube Using different outline formula logic at parent level Creating a load rule for SQL data load using substitution variables Using MDX in aggregate storage applications Up Chapter 6: Creating Calculation Scripts Introduction Using Essbase Set function commands and Calc All to calculate cubes Using control flow commands, conditional, and logical operators Using substitution variables in calculations script Using UDAs and Calc Two Pass in calculation scripts Using Attributes in calculation scripts Clearing data and using the cross- dimensional operators in a calculation script Using allocation functions in calculation scripts Modifying Essbase settings to improve calculation performance Using MDX to calculate Aggregate Storage database Up Chapter 7: Using MaxL to Automate Process Introduction Setting up folder structure and other files needed for MaxL automation Executing dimension build rules using MaxL Executing load rules using MaxL Executing calculations using MaxL Executing partitions using MaxL Executing report scripts using MaxL Adding or changing substitution variables with MaxL Using ASO incremental data loads Using encryption in MaxL scripts Deploy dimension created in Essbase Studio Up Chapter 8: Data Integration Introduction Using report script to extract data to a text file Using the DATAEXPORT function to extract data into a text file Using the DATAEXPORT function to extract data into a relational source Exporting data using column format Using MaxL to extract the outline in XML format Using @XREF functions to move data between BSO cubes Partitioning data from BSO to ASO cubes Using MDX for extracting data using API There's more Up Chapter 9: Provisioning Security Using MaxL Editor or Shared Services Introduction Using MaxL editor to add and externalize a user Using Shared Services to add and provision a user Using MaxL Editor to set up a filter for MetaRead and Write access Using Shared Services to provision filters to a group Using Shared Services to provision calculation scripts to a group Using MaxL to export security file Up Chapter 10: Developing Dynamic Reports Introduction Creating a connection and using substitution variables in financial reports Using the column templates and formatting reports Retrieving data using UDAs and Attributes Retrieving data using children and descendants member set functions Using User Prompts and the POV to select members Using conditional formatting and suppression in financial reports Adding related content to financial reports Creating a web analysis report http://www.packtpub.com/oracle-essbase-11-development-cookbook/book

16,722

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧