dbTalk Databases Forums  

column aliasing in dynamic mdx

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


Discuss column aliasing in dynamic mdx in the microsoft.public.sqlserver.olap forum.



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

Default column aliasing in dynamic mdx - 01-15-2004 , 04:39 PM






Hello,

What i'm trying to figure out is how to do a column alias
in mdx similar to SQL AS.

**What i need is that this mdx always returns the same
number and alias name of columns in the flattened
resultset, regardless of value of the row parameter
(below)**

This is the dynamic mdx:

="select { [Measures].[Orders] } on columns,{" +
Parameters!Region.Value + ".Children } on rows from
ContactSales where [InvoiceDate].[2002].

where Parameters!Region.Value could any be one of these:

[Contact].[Region].[All ContactRegion].[THE AMERICAS].
[North America].[United States]
[Contact].[Region].[All ContactRegion].[THE AMERICAS]
[Contact].[Region].[All ContactRegion].[THE AMERICAS].
[North America]
[Contact].[Region].[All ContactRegion].[THE AMERICAS].
[North America].[United States].[Texas]


This was the closest i could get:

with MEMBER [Contact].[Region].[THE AMERICAS].[North
America].[United States].[Texas] AS 'mymember'
select
{ [Measures].[Orders] } on columns,
{ mymember.Children } on rows
from ContactSales where [InvoiceDate].[2002]


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.