dbTalk Databases Forums  

help with where clause

comp.databases.olap comp.databases.olap


Discuss help with where clause in the comp.databases.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alberto
 
Posts: n/a

Default help with where clause - 12-04-2006 , 06:52 AM






I'm new to mdx. I need to write a where that in sql would be like

where
( dimension1=value1 OR dimension2=value1 OR dimension3=value1)
AND
(any other contidion)

How do I create this condition ?

What I need is to prefilter data in order to show only data to which
the current user has access to ( but current user is stored in more
than one dimension)

thank you!


Reply With Quote
  #2  
Old   
Helmut Knappe
 
Posts: n/a

Default Re: help with where clause - 12-07-2006 , 03:07 AM






Hi Alberto,

With the Where condition in MDX you can only select a Tuple, which means a
combination of single members in different dimensions that don't show on the
axes.

If I understand that right and you know the members that you wish to see the
Where condition should look like
where (dimension1.member1, dimension2.member1, dimension3.member1)

However, if you don't know the members, but have to look them up or search
for them using conditions like
if dimension1=value1 OR dimension2=value1 OR dimension3=value1 then ...
you need to either create these members first using the WITH MEMBER clause,
or place them on an axis.

Please let me know, if this helps.
Helmut

"Alberto" <a.marchi (AT) tiscali (DOT) it> schrieb im Newsbeitrag
news:1165236773.673632.111200 (AT) 80g2000cwy (DOT) googlegroups.com...
Quote:
I'm new to mdx. I need to write a where that in sql would be like

where
( dimension1=value1 OR dimension2=value1 OR dimension3=value1)
AND
(any other contidion)

How do I create this condition ?

What I need is to prefilter data in order to show only data to which
the current user has access to ( but current user is stored in more
than one dimension)

thank you!




Reply With Quote
  #3  
Old   
Alberto
 
Posts: n/a

Default Re: help with where clause - 12-07-2006 , 10:01 AM



Quote:
However, if you don't know the members, but have to look them up or search
for them using conditions like
if dimension1=value1 OR dimension2=value1 OR dimension3=value1 then ...
you need to either create these members first using the WITH MEMBER clause,
or place them on an axis.

thanks, I did something like this. I don't knwo mdx very well, and
don't have time to discover it deeply.

I did this: created ONE dimension with all ids enabled to see that row,
separater with |

then a member with Filter and aggregate that keeps only those that
contains (with instr) a string like

Quote:
xxxx|
where xxxx is the current user id.

it seems to work.
thank you!



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.