Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How i can replace the sql query with mdx Expand / Collapse
Author
Message
Posted Thursday, September 6, 2012 2:41 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 3:52 AM
Points: 55, Visits: 354
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
Post #1355120
Posted Thursday, September 6, 2012 2:48 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, August 28, 2014 2:39 AM
Points: 1,880, Visits: 2,846
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])
)


----------------------------------------------
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
Post #1355124
Posted Thursday, September 6, 2012 3:44 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 3:52 AM
Points: 55, Visits: 354
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
Post #1355161
Posted Monday, September 17, 2012 12:12 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
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
Post #1359983
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse