dbTalk Databases Forums  

about MDX

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


Discuss about MDX in the microsoft.public.sqlserver.olap forum.



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

Default about MDX - 06-05-2006 , 08:31 AM






Q1:

The function named "Contains()" is documented in the SQL Server2005 help.
But it doesn't work. It seems that there is not such a function.

Q2:

How can I compute date value in MDX? For example, there is a dimension
[Order].
It has an attribute [Order].[OderDate] . I want to get the members between
some date segmnet such as between '1998-01-01T00:00:00' and three months
after. How to express it ?


Reply With Quote
  #2  
Old   
Tim Dot NoSpam
 
Posts: n/a

Default Re: about MDX - 06-05-2006 , 12:09 PM






Q1: I don't know.
Q2:


WITH MEMBER [TimeSet] as
'{STRToMember("[Order].[OrderDate].&[1998-01-01T00:00:00] :
StrToMember("[Order].[OrderDate].&[" & dateadd("m", 3,
CDate("1998-01-01")) & "]"}'
SELECT ....


You can use a custom member set that dynamically creates your members using
STrToMember function...

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

Quote:
Q1:

The function named "Contains()" is documented in the SQL Server2005 help.
But it doesn't work. It seems that there is not such a function.

Q2:

How can I compute date value in MDX? For example, there is a dimension
[Order].
It has an attribute [Order].[OderDate] . I want to get the members between
some date segmnet such as between '1998-01-01T00:00:00' and three months
after. How to express it ?




Reply With Quote
  #3  
Old   
GuoLipeng
 
Posts: n/a

Default Re: about MDX - 06-05-2006 , 12:49 PM



Thank you very much.

"Tim Dot NoSpam" wrote:

Quote:
Q1: I don't know.
Q2:


WITH MEMBER [TimeSet] as
'{STRToMember("[Order].[OrderDate].&[1998-01-01T00:00:00] :
StrToMember("[Order].[OrderDate].&[" & dateadd("m", 3,
CDate("1998-01-01")) & "]"}'
SELECT ....


You can use a custom member set that dynamically creates your members using
STrToMember function...

"GuoLipeng" <GuoLipeng (AT) discussions (DOT) microsoft.com> wrote in message
news:1A47FD4E-1C79-48F4-AE41-CA6A8095516F (AT) microsoft (DOT) com...
Q1:

The function named "Contains()" is documented in the SQL Server2005 help.
But it doesn't work. It seems that there is not such a function.

Q2:

How can I compute date value in MDX? For example, there is a dimension
[Order].
It has an attribute [Order].[OderDate] . I want to get the members between
some date segmnet such as between '1998-01-01T00:00:00' and three months
after. How to express 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.