Monday, March 26, 2012

Reg - Passing parameters to MDX Queries

Hi,
I am trying to use parameters in MDX Queries From one data set to other data
Set I created a data set which gives me Time values.
I am using this as parameter value as I do in SQL Queries.
Ex -
SELECT {[Measures].[Unit Sales]} on columns,
ORDER([Promotion Media].[Media Type].members,[Measures].[Unit Sales],DESC)
on rows FROM SALES where @.Time
When run It does'nt populate the value for the @.Time parameter
When i preview the report it populates the parameter values but when the
report view button is clicked it fails to build the Query because it cannot
populate the string.
Is there any other way to use the parameters and pass the parameters in MDX
Queries?
if possible with Examples
Thanks,Hi!
In MDX, this is not so simple. Checkt the article at
http://www.databasejournal.com/features/mssql/article.php/10894_3386441_1
for the procedure.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Yalaman" <Yalaman@.discussions.microsoft.com> wrote in message
news:413ED68C-5AD5-4143-B079-1ADDE5DB6EF2@.microsoft.com...
> Hi,
> I am trying to use parameters in MDX Queries From one data set to other
data
> Set I created a data set which gives me Time values.
> I am using this as parameter value as I do in SQL Queries.
> Ex -
> SELECT {[Measures].[Unit Sales]} on columns,
> ORDER([Promotion Media].[Media Type].members,[Measures].[Unit Sales],DESC)
> on rows FROM SALES where @.Time
> When run It does'nt populate the value for the @.Time parameter
> When i preview the report it populates the parameter values but when the
> report view button is clicked it fails to build the Query because it
cannot
> populate the string.
>
> Is there any other way to use the parameters and pass the parameters in
MDX
> Queries?
> if possible with Examples
> Thanks,
>
>
>
>
>|||The OleDB provider for AS 2000 does not support parameterized MDX queries.
This MSDN article explains how to achieve parameterized MDX in RS 2000:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/olapasandrs.asp
In addition, you may want to download this sample:
http://www.microsoft.com/downloads/details.aspx?FamilyID=f9b6e945-1f4c-4b7c-9c83-c6801f0576ff&DisplayLang=en
BTW: RS 2005 Beta 2 contains graphical and text-based query designers for
MDX and DMX. They also support single-value parameters at this point.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:e6eUiDqrEHA.1964@.TK2MSFTNGP12.phx.gbl...
> Hi!
> In MDX, this is not so simple. Checkt the article at
> http://www.databasejournal.com/features/mssql/article.php/10894_3386441_1
> for the procedure.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "Yalaman" <Yalaman@.discussions.microsoft.com> wrote in message
> news:413ED68C-5AD5-4143-B079-1ADDE5DB6EF2@.microsoft.com...
> > Hi,
> >
> > I am trying to use parameters in MDX Queries From one data set to other
> data
> > Set I created a data set which gives me Time values.
> >
> > I am using this as parameter value as I do in SQL Queries.
> >
> > Ex -
> > SELECT {[Measures].[Unit Sales]} on columns,
> > ORDER([Promotion Media].[Media Type].members,[Measures].[Unit
Sales],DESC)
> > on rows FROM SALES where @.Time
> >
> > When run It does'nt populate the value for the @.Time parameter
> >
> > When i preview the report it populates the parameter values but when the
> > report view button is clicked it fails to build the Query because it
> cannot
> > populate the string.
> >
> >
> > Is there any other way to use the parameters and pass the parameters in
> MDX
> > Queries?
> > if possible with Examples
> >
> > Thanks,
> >
> >
> >
> >
> >
> >
> >
> >
> >
>

No comments:

Post a Comment