문제

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

도움이 되었습니까?

해결책

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]

다른 팁

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 (]]).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top