how to write an mdx subquery

i want to write a subquery using mdx.

in sql that would be something like

CREATE PROCEDURE sp_proc
@param1 varchar(55)
as
Select id,name  from table1
where id in(
SELECT distinct  id
FROM         table2 where field='param1'
)
GO

 

please let me know how to implement this functionality using mdx queries.



Answer this question

how to write an mdx subquery

  • Beverly

    Hi,

    You could also use the WITH MEMBER syntax if you know that the subquery would only return a single member rather than a set.

    A question for Darren though, can either of these syntaxes be used in calculated measures

    Regards,

    Richard


  • Kumar_77

    This is only supported in AS 2005, but it is similar in concept to SQL

    SELECT ...

    FROM ( SELECT ... )

    Regards
    Darren Gosbell
    http://geekswithblogs.net/darrengosbell



  • how to write an mdx subquery