Question

I'm building a BI dashboard for my client. Our data is stored in an analysis server cube. Overall things work great, but a smartalec tester decided to create a merchant with the name `~!@#$%^&*()_+-=[]{}|;':"<>?,./ The name shows up just fine as a part of a query result, but if the user trys to drill in to the merchant we of course blow up b/c the \ { ; [ " are all part of MDX. Is there a way to escape these characters? I've tried putting a \ in front, or doubling the character. I've searched all over, but not turn up anything.

TIA

Was it helpful?

Solution

You must use the [] notation for your names and escape (only) the right bracket. Here is an example declaring a calculated measure with the name to escape (notice the ]] ):

with member [`~!@#$%^&*()_+-=[]]{}|;':"<>?,./] as 42
select [`~!@#$%^&*()_+-=[]]{}|;':"<>?,./] on 0 from [cube]

OTHER TIPS

Could you try use [ ] brackets? I think it should help. But you should also "escape" your own brackets.

MSDN

If the body of the identifier contains only a left bracket ([), no additional handling is required. If the body of the identifier contains a right bracket (]), you must specify two right brackets (]]).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top