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


Need Clarification on MDX Query (StrToMember and StrToValue) in SQL 2008


Need Clarification on MDX Query (StrToMember and StrToValue) in SQL 2008

Author
Message
H4K
H4K
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1219 Visits: 567
Hi Experts,

Here i have replaced input parameter '@Grouping' with '[Product].[Category]'

Following is the query that give different results in SQL 2008 i.e., All
than in SQL 2005 i.e., Each Member in [Product].[Category]

With
Member [Measures].[Category]
Case "[Product].[Category]"
When "All"
Then "All"
Else StrToMember("[Product].[Category]" + '.CurrentMember').Member_Caption
End

The above query doesn't work as desired (as in sql 2005 it used to work).
I need to know why this is happening ? What's the reason for this ?
Please Help :-)!!!

Regards,
Amar S.

BI Developer
SSRS, SSIS, SSAS, IBM Cognos, IBM Infosphere Cubing services, Crystal reports, IBM DB2, SQL Server, T-SQL
Please visit... ApplyBI
hila
hila
SSC Journeyman
SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)

Group: General Forum Members
Points: 79 Visits: 85
I don't promise anything, but Mosha explains a bit about this in here:
http://www.mosha.com/msolap/articles/mdxconvertstringtonumber.htm
So maybe that's help?

(If it works don't break it. Publish this as a "new feature" in your blog...)
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