Everything works fine until I pass an MDX statement containing an ampersand.
Doing so I get the following error: -
Formula error - cannot find dimension member
("[Time].[Fiscal].[Year].[2004].[Period 12].[Week 49].&[08/01/2005 ]") - in a
name-binding function
If I remove '.&[08/01/2005 ]' then everything works fine.
How I can I pass mdx queries containing ampersands?
Cheers,
Mark...
Chris
I should have mentioned that in the original message. I have infact tried
both & and %26 (as you'd use it as part of the url) and I keep getting an AS
mdx error: -
Formula error - syntax error - token is not valid: "(
[Time].[Fiscal].[Year].[2004].[Period 12].[Week 50].&^;^[10/01/2005 ],
[TradeIndicator].[Trade Flag].[Trade])"
The MDX works when using in Proclarity and the MDX sample app. Any
statements I sue work when the ampersand isn't in the code but when one is
used I keep getting the 'cannot find dimension member' error.
Any more ideas?
Mark...
==================================
Cheers...
"Mark Bateman" wrote:
> Hi there Chris
>
> I should have mentioned that in the original message. I have infact tried
> both & and %26 (as you'd use it as part of the url) and I keep getting an AS
> mdx error: -
>
> Formula error - syntax error - token is not valid: "(
> [Time].[Fiscal].[Year].[2004].[Period 12].[Week 50].&^;^[10/01/2005 ],
I suspect the problem might be connected to the key values you're using for
your dimension. Can you create unique, integer keys for the members on all
levels of the dimension and then alter the dimension in Analysis Services so
it uses them rather than using the name as the key as you seem to be doing at
the moment?
Regards,
Chris
"Mark Bateman" wrote:
> I should note that even though my reply reads 'both & and %26', I actually
> had put the &[ersand]; escape code where the & is now.
To get around the problem I'm using dimensions in my mdx by calling the
member name instead of the member key. It just means I have to change all my
mdx statements which is a bit of a pain.
Seems worrying though that using this xmla connection, not all mdx
statements work since the ampersand symbol isn't allowed.
Thanks for your help,
Mark...
Have you tried testign this yourself? Can you pass ampersands?
Cheers again,
Mark...
Apart from the fact that you're using the name of the member as its key, can
you tell me what the 'Member Keys Unique' property on the dimension and all
the levels is set to? Is it set to False? If your keys are in fact unique,
can you set it to true?
I can set the 'Member Keys Unique' property for the Date level to true.
Thank you very much indeed. But can you tell me why you this this would have
had an impact?