SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How i can replace the sql query with mdx


How i can replace the sql query with mdx

Author
Message
inampudianil
inampudianil
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
Points: 70 Visits: 374
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
Henrico Bekker
Henrico Bekker
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3706 Visits: 4371
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])
)
inampudianil
inampudianil
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
Points: 70 Visits: 374
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
Raunak Jhawar
Raunak Jhawar
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1657 Visits: 1944
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

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search