Reputation: 4767
How would I do the following cast operation?
CAST(Season) + PlayerSlug
PlayerSlug
is of type System.String
and Season
is of type System.Int32
. I want the result to be something like:
"2014-TomJones"
How would I do this? Doing a straight concat returns a type of Int32
instead of string:
PlayerSlug + Season
Upvotes: 1
Views: 1996
Reputation: 1
Try CStr() and CInt() to convert to string and int. E.g. CStr(Season) + PlayerSlug
Upvotes: 0
Reputation: 1515
If you need this on MDX you can try to use Member_Name and check if it's WChar (by default it's WChar even for integer keys).
Test query:
with member [Year_Country]
as [Date].[Year].CurrentMember.Member_Name
+" - "+[Location].[Country].CurrentMember.Member_Name
select
[Year_Country] on 0
,[Location].[Country].Members*[Date].[Year].Members on 1
from [My_Cube]
Result is:
Upvotes: 1