dbTalk Databases Forums  

Are there any wild card characters in MDX?

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Are there any wild card characters in MDX? in the microsoft.public.sqlserver.olap forum.



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

Default Are there any wild card characters in MDX? - 08-12-2004 , 01:42 PM






Are there any wild card characters in MDX like there are in SQL?

For example I can do this in SQL:

Select * from Employees
where name like 'abc%'

Can you do that with MDX?

Thanks,

Shab

** The contents in this message are provided as is and is not guaranteed
to be correct **

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
Sanka
 
Posts: n/a

Default RE: Are there any wild card characters in MDX? - 08-12-2004 , 05:25 PM






You can use the MDX Filter() function and the VBA text functions to have
plenty of search functionalities...

Contains Search : filter ( <<set>>, instr(<<dim>>.currentmember.name,
<<searchstr>>)>0)
Exact Match: filter ( <<set>>, <<dim>>.currentmember.name= <<searchstr>>)
Starts with: filter ( <<set>>, left(<<dim>>.currentmember.name,
len(<<searchstr>>))="<<searchstr>>")

Cheers,
Sanka



"shab nash" wrote:

Quote:
Are there any wild card characters in MDX like there are in SQL?

For example I can do this in SQL:

Select * from Employees
where name like 'abc%'

Can you do that with MDX?

Thanks,

Shab

** The contents in this message are provided as is and is not guaranteed
to be correct **

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #3  
Old   
shab nash
 
Posts: n/a

Default Re: Are there any wild card characters in MDX? - 08-13-2004 , 07:32 AM



OK. I had found out how to use filter with = and left and right but I
didn't know I could use Instr in there. Well,thanks. This makes it much
easier.
So what if I want to find out if a string has *a*b* in it? I have to
parse it and break it into : instr(mystring,1)*instr(mystring,b)>0 ? Is
there a single function in VB that does that?

Thanks,

Shab


** The contents in this message are provided as is and is not guaranteed
to be correct **

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #4  
Old   
Sanka
 
Posts: n/a

Default Re: Are there any wild card characters in MDX? - 08-13-2004 , 01:43 PM



Hi,

MDX Functions in Analysis Services

http://msdn.microsoft.com/library/de...intro_65iw.asp

Kindly look at the "Registered Function Libraries" section which explains
about the list of available VBA and Excel functions which can be used with
Analysis Services 2000.

Cheers,
Sanka


"shab nash" wrote:

Quote:
OK. I had found out how to use filter with = and left and right but I
didn't know I could use Instr in there. Well,thanks. This makes it much
easier.
So what if I want to find out if a string has *a*b* in it? I have to
parse it and break it into : instr(mystring,1)*instr(mystring,b)>0 ? Is
there a single function in VB that does that?

Thanks,

Shab


** The contents in this message are provided as is and is not guaranteed
to be correct **

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #5  
Old   
shab nash
 
Posts: n/a

Default Re: Are there any wild card characters in MDX? - 08-13-2004 , 02:02 PM



Thanks for the list. I am implementing the wildcards with Instr.

Shab

** The contents in this message are provided as is and is not guaranteed
to be correct **

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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 - 2012, Jelsoft Enterprises Ltd.