dbTalk Databases Forums  

metadata query - bottom level members - looking for efficient code

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss metadata query - bottom level members - looking for efficient code in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rod
 
Posts: n/a

Default metadata query - bottom level members - looking for efficient code - 03-06-2005 , 06:29 PM






Greetings,

I'm interested in learning how to create queries against a cubes metadata.
Specifically I'm interested in writing a query, using VB, to return a
collection of bottom level members relative to a given member name.

Using the MDX Sample appication I can execute the query:

select
Descendants([Customer].[All Customer].[Canada],,leaves) on columns
from Sales

to get the members, however, the query appears to attempt to bring back
data, thus is probably an expensive method.

It would be great to understand how to implement a meta data query without
have to resort to recursion,

TIA

Reply With Quote
  #2  
Old   
Ohjoo Kwon
 
Posts: n/a

Default Re: metadata query - bottom level members - looking for efficient code - 03-06-2005 , 09:30 PM






There are some threads already discussed in this group. I think you still
have to use ADOMD not DSO, and therefore you still have to use MDX. Because
MDX is designed to query aginst Cube not Meta data.

But looks like it is possible to get meta data from dimension using MDX
directly in AS2005.

http://groups.google.co.kr/groups?hl...gbl%26rnum%3D1

http://groups.google.co.kr/groups?hl...gbl%26rnum%3D7


Ohjoo Kwon


"Rod" <Rod (AT) discussions (DOT) microsoft.com> wrote

Quote:
Greetings,

I'm interested in learning how to create queries against a cubes metadata.
Specifically I'm interested in writing a query, using VB, to return a
collection of bottom level members relative to a given member name.

Using the MDX Sample appication I can execute the query:

select
Descendants([Customer].[All Customer].[Canada],,leaves) on columns
from Sales

to get the members, however, the query appears to attempt to bring back
data, thus is probably an expensive method.

It would be great to understand how to implement a meta data query without
have to resort to recursion,

TIA



Reply With Quote
  #3  
Old   
Deepak Puri
 
Posts: n/a

Default Re: metadata query - bottom level members - looking for efficient code - 03-07-2005 , 10:20 PM



If your concern is to avoid accessing any cube data, how about returning
a text measure instead, like:

Quote:
With Member [Measures].[CustomerName] as
'[Customers].CurrentMember.Name'
select
{[Measures].[CustomerName]} on columns,
Descendants([Customers].[All Customers].[Canada],,leaves) on rows
from Sales
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.