dbTalk Databases Forums  

Alias Name in MDX Qry

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


Discuss Alias Name in MDX Qry in the microsoft.public.sqlserver.olap forum.



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

Default Alias Name in MDX Qry - 04-21-2006 , 06:49 PM







Hi,

Is there any way we assign Alias Name in MDX Qry ..for example
select
{ [Measures].[Units Shipped} on columns,
NON EMPTY [Store].[Store Name].members on rows
from Warehouse

Now I would like to assign alias name for
{ [Measures].[Units Shipped] } as Units

select
{ [Measures].[Units Shipped]} as Units on columns,
NON EMPTY [Store].[Store Name].members on rows
from Warehouse

Thanks
-Kris



Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Alias Name in MDX Qry - 04-21-2006 , 07:45 PM






MDX does not have the concept of an alias like SQL does. What you could
do in this particular situation is to create a query scope calculated
measure with the name you want that simply returns the underlying
measure.

eg.

WITH
MEMBER Measures.[Units] as '[Measures].[Units Shipped]'
select
{ [Measures].[Units]} on columns,
NON EMPTY [Store].[Store Name].members on rows
from Warehouse

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <9E2770D7-D722-4947-9602-EBA1D79EE748 (AT) microsoft (DOT) com>,
Kris (AT) discussions (DOT) microsoft.com says...
Quote:
Hi,

Is there any way we assign Alias Name in MDX Qry ..for example
select
{ [Measures].[Units Shipped} on columns,
NON EMPTY [Store].[Store Name].members on rows
from Warehouse

Now I would like to assign alias name for
{ [Measures].[Units Shipped] } as Units

select
{ [Measures].[Units Shipped]} as Units on columns,
NON EMPTY [Store].[Store Name].members on rows
from Warehouse

Thanks
-Kris




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.