How i can replace the sql query with mdx

  • Hi

    select *

    FROM users where user_id not in (select user_id from emp where is_actv=1).

    In this Users and Emp both are dimensions and they are have referntial integrity with userid.Could you please help me with MDX script

    Thanks in advance

    aa

  • Example:

    select {[Measures].[Amount], [Measures].[Transaction Cost], [Measures].[Transaction Number]} ON COLUMNS,

    { ManualProcessing].[All ManualProcessings].[MANUAL]} ON ROWS

    FROM [Transactions]

    where

    (

    except([Product].[All Products].Children,{[Product].[All Products].[Debit}),

    except([Set],[Set to exclude])

    )

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Hi

    Thanks for your answer..based on ur query,i have written like this.

    SELECT NON EMPTY { } ON COLUMNS,

    NON EMPTY { ([PH_CUST].[CUST].ALLMEMBERS ) } ON ROWS

    FROM Ad_CUBE

    where except([PH_CUST].[Cust].Children,{[EMP].[PHWEB].[Activce].&[1]})

    is it Correct thing i have done?

    i am just tryng basic..please let me out..

    Thanks in advance

    aa

  • You can also re-write as below:

    WITH SET SetA as Except([PH_CUST].[Cust].Children,{[EMP].[PHWEB].[Activce].&[1]})

    SELECT { } ON COLUMNS,

    NON EMPTY { SetA } ON ROWS

    FROM Ad_CUBE

    Raunak J

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply