dbTalk Databases Forums  

Passing parameters through MDX

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


Discuss Passing parameters through MDX in the microsoft.public.sqlserver.olap forum.



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

Default Passing parameters through MDX - 04-07-2004 , 06:21 AM






Hello,
how is it possible to pass parameters through
MDX? for eg:

SELECT {[qty invoiced], [Cost], [Price]} ON COLUMNS,
NonEmptyCrossJoin ([N_Cust].Members,[N_time].Members) ON
ROWS FROM N_Cube

I saw in a previous reply to this question you can pass
the MDX code as string, but this is hard coded at design
time right, is it possible to get parameter values @
RUNTIME? suppose i want the user to enter a value for the
year field so that informtion will be filtered based on
that year

thanks
regards
Imran

Reply With Quote
  #2  
Old   
Chris Webb
 
Posts: n/a

Default RE: Passing parameters through MDX - 04-07-2004 , 08:21 AM






No, this isn't possible in MDX - as was stated in the previous reply, the only way to do it is to build the MDX query string dynamically in your client application

Chri

----- Imran wrote: ----

Hello
how is it possible to pass parameters through
MDX? for eg

SELECT {[qty invoiced], [Cost], [Price]} ON COLUMNS
NonEmptyCrossJoin ([N_Cust].Members,[N_time].Members) ON
ROWS FROM N_Cub

I saw in a previous reply to this question you can pass
the MDX code as string, but this is hard coded at design
time right, is it possible to get parameter values @
RUNTIME? suppose i want the user to enter a value for the
year field so that informtion will be filtered based on
that yea

thank
regard
Imra


Reply With Quote
  #3  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: Passing parameters through MDX - 04-07-2004 , 12:39 PM



Another technique, which is more limited, but more secure against MDX
injection attacks is to use StrToXXX family of functions.

--
==================================================
Mosha Pasumansky - http://www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================
"Chris Webb" <OnlyForPostingToNewsgroups (AT) hotmail (DOT) com> wrote

Quote:
No, this isn't possible in MDX - as was stated in the previous reply, the
only way to do it is to build the MDX query string dynamically in your
client application.
Quote:
Chris

----- Imran wrote: -----

Hello,
how is it possible to pass parameters through
MDX? for eg:

SELECT {[qty invoiced], [Cost], [Price]} ON COLUMNS,
NonEmptyCrossJoin ([N_Cust].Members,[N_time].Members) ON
ROWS FROM N_Cube

I saw in a previous reply to this question you can pass
the MDX code as string, but this is hard coded at design
time right, is it possible to get parameter values @
RUNTIME? suppose i want the user to enter a value for the
year field so that informtion will be filtered based on
that year

thanks
regards
Imran




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.