How to parameterized query.........
hello.....
i don't know how parameterized mdx query.....
can give me solution please.....
with
set set1 as
(
{[date].[newdate].[2008-07-05 00:00:00.000]:[date].[newdate].[2008-07-25 00:00:00.000]}
,{[date].[arrivedate].[2008-01-01 00:00:00.000] : [date].[arrivedate].[2008-12-27 00:00:00.000]}
,{[date].[departdate].[2008-01-01 00:00:00.000] : [date].[departdate].[2008-12-30 00:00:00.000]}
,[status].[businessid].[businessid]
,[status].[p pickroom]
,[status].[pickroom]
,[status].[p statusid]
,[status].[statusid]
)
member [measures].z as sum
(
set1,case
when ([measures].[p statusid] =3
and [measures].[statusid] = 3
and [measures].[p pickroom] = 0
and [measures].[pickroom] = 0 )
then ([measures].[blockroom] -[measures].[p blockroom])
when ([measures].[p statusid] =3
and [measures].[statusid] = 3
and [measures].[p pickroom] = 1
and [measures].[pickroom] = 1 )
then ([measures].[pickroom]-[measures].[p pickroom])
end
)
select [measures].[z] on 0 from [demo]........
this query.......
looks u want make date part parameterized
in case can use, strtomember("[date].[newdate].["+cstr(now())+" 00:00:00.000]") or
strtomember("[date].[newdate].["+cstr(@paramter)+" 00:00:00.000]")
the @parameter defined in ssrs report/
vinu
SQL Server > SQL Server Analysis Services
Comments
Post a Comment