dbTalk Databases Forums  

How to support SQL "LIKE" operator in MDX

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


Discuss How to support SQL "LIKE" operator in MDX in the microsoft.public.sqlserver.olap forum.



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

Default How to support SQL "LIKE" operator in MDX - 11-10-2003 , 02:39 AM






Hello,
How do I support SQL "LIKE" operator in MDX.
eg. select unit_sales, Customer.Name from SomeTable where CustomerName like
"Ni*";
How DO I construct corrosponding MDX statement.

Thanks
Santosh



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

Default Re: How to support SQL "LIKE" operator in MDX - 11-10-2003 , 12:13 PM






Hi
Thanks for the information.
Left would solve only the wild card character usage appearing towards the
end of the string.
Again I need to use Right function for certein functions.

what I am looking for , is a capabilities simillar to the regular
expressions.
I do not know much about VBA.
Is there any function in VBA that can take a regular expression string and
return indication that wheather a given string matches the regular
expression or not.

Thanking Again

Santosh
"Jörg" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Hello Santosh,
SQL "LIKE" is not able in MDX. But you can
use VBA Functions:

Select
FILTER(
[customers].[name].members,
VBA!LEFT(Customers.currentmember.name,2) = "Ni"
)
on 0 from sales

HTH
Jörg

Quote:
-----Original Message-----
Hello,
How do I support SQL "LIKE" operator in MDX.
eg. select unit_sales, Customer.Name from SomeTable where
CustomerName like
"Ni*";
How DO I construct corrosponding MDX statement.

Thanks
Santosh


.




Reply With Quote
  #3  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: How to support SQL "LIKE" operator in MDX - 11-10-2003 , 03:06 PM



VBA's InStr function supports wildcards - while not true regular
expression - this is close enough.

--
==================================================
Mosha Pasumansky - http://www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================



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.