dbTalk Databases Forums  

How to declare and set a MDX parameter ?

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


Discuss How to declare and set a MDX parameter ? in the microsoft.public.sqlserver.olap forum.



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

Default How to declare and set a MDX parameter ? - 10-12-2006 , 03:25 AM






Hi, I'am new with MDX and I'am looking for a way to define and set a MDX parameter within the MDX context (MDX script ?). Afterwards I want to be able to use the MDX parameter in a MDX query.

Example:
This is (a simplified version of) my MDX Query:
SELECT ( STRTOSET(@MyParameter, CONSTRAINED) ) ON COLUMNS FROM [MyCube]

How can I define the parameter @MyParameter and set it to e.g. '[Resources].[Resources].[Group Name].&[ILI].&[ID].&[157].&[385]' ?

Thanks to all for any help :-)

Timmo


EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Reply With Quote
  #2  
Old   
Kyoshiro
 
Posts: n/a

Default Re: How to declare and set a MDX parameter ? - 10-12-2006 , 10:55 AM






STRTOSET(SELECT(STRTOSET(@MyParameter,
CONSTRAINED)).ITEM(0).UNIQUENAME)


Timmo ha escrito:

Quote:
Hi, I'am new with MDX and I'am looking for a way to define and set a MDX parameter within the MDX context (MDX script ?). Afterwards I want to be able to use the MDX parameter in a MDX query.

Example:
This is (a simplified version of) my MDX Query:
SELECT ( STRTOSET(@MyParameter, CONSTRAINED) ) ON COLUMNS FROM [MyCube]

How can I define the parameter @MyParameter and set it to e.g. '[Resources].[Resources].[Group Name].&[ILI].&[ID].&[157].&[385]' ?

Thanks to all for any help :-)

Timmo


EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com


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.