dbTalk Databases Forums  

ampersand in mdx

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss ampersand in mdx in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Bateman
 
Posts: n/a

Default ampersand in mdx - 01-08-2005 , 09:23 AM






I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #2  
Old   
Chris Webb
 
Posts: n/a

Default RE: ampersand in mdx - 01-10-2005 , 05:15 AM






Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

Quote:
I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #3  
Old   
Mark Bateman
 
Posts: n/a

Default RE: ampersand in mdx - 01-10-2005 , 10:25 AM



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].&amp^;^[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...

==================================
"Chris Webb" wrote:

Quote:
Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #4  
Old   
Mark Bateman
 
Posts: n/a

Default RE: ampersand in mdx - 01-10-2005 , 10:47 AM



I should note that even though my reply reads 'both & and %26', I actually
had put the &amp[ersand]; escape code where the & is now.

Cheers...

"Mark Bateman" wrote:

Quote:
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 ],
[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...

==================================
"Chris Webb" wrote:

Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #5  
Old   
Chris Webb
 
Posts: n/a

Default RE: ampersand in mdx - 01-12-2005 , 07:51 AM



Hi Mark,

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:

Quote:
I should note that even though my reply reads 'both & and %26', I actually
had put the &[ersand]; escape code where the & is now.

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 ],
[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...

==================================
"Chris Webb" wrote:

Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #6  
Old   
Mark Bateman
 
Posts: n/a

Default RE: ampersand in mdx - 01-12-2005 , 08:33 AM



Hi Chris,

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...

"Chris Webb" wrote:

Quote:
Hi Mark,

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.

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 ],
[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...

==================================
"Chris Webb" wrote:

Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #7  
Old   
Chris Webb
 
Posts: n/a

Default RE: ampersand in mdx - 01-12-2005 , 08:39 AM



I'm not sure it's that the ampersand isn't allowed, I think it is because AS
is having trouble locating members in some circumstances when you use the
ampersand syntax (ie when you're requesting a member by its key), because of
the keys you've chosen for these members.

"Mark Bateman" wrote:

Quote:
Hi Chris,

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...

"Chris Webb" wrote:

Hi Mark,

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.

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 ],
[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...

==================================
"Chris Webb" wrote:

Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #8  
Old   
Mark Bateman
 
Posts: n/a

Default RE: ampersand in mdx - 01-12-2005 , 09:07 AM



Maybe so, but it can't be denied that the exact same pasted mdx code works
when pointing to the cube using ProClarity or the sample MDX app. Once the
ampersand is excluded, my test app works. Maybe I need to set up something at
the IIS side that caters for ampersands? Then again I'm only clutching at
straws.

Have you tried testign this yourself? Can you pass ampersands?

Cheers again,

Mark...

"Chris Webb" wrote:

Quote:
I'm not sure it's that the ampersand isn't allowed, I think it is because AS
is having trouble locating members in some circumstances when you use the
ampersand syntax (ie when you're requesting a member by its key), because of
the keys you've chosen for these members.

"Mark Bateman" wrote:

Hi Chris,

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...

"Chris Webb" wrote:

Hi Mark,

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.

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 ],
[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...

==================================
"Chris Webb" wrote:

Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #9  
Old   
Chris Webb
 
Posts: n/a

Default RE: ampersand in mdx - 01-12-2005 , 09:23 AM



Certainly the same MDX works when you run it using PTS on own machine, as
when you're using MDX Sample app, but when you run it through XMLA then PTS
is actually running on the server (and possibly using different connection
string properties, etc). The reason I'm suggesting you change the keys you're
using is that other people on this ng have had the same problem and not been
using XMLA, and it always seems to have been caused by their choice of key.
Unfortunately I can't test this myself because I don't have an install of
XMLA handy at the moment.

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?

"Mark Bateman" wrote:

Quote:
Maybe so, but it can't be denied that the exact same pasted mdx code works
when pointing to the cube using ProClarity or the sample MDX app. Once the
ampersand is excluded, my test app works. Maybe I need to set up something at
the IIS side that caters for ampersands? Then again I'm only clutching at
straws.

Have you tried testign this yourself? Can you pass ampersands?

Cheers again,

Mark...

"Chris Webb" wrote:

I'm not sure it's that the ampersand isn't allowed, I think it is because AS
is having trouble locating members in some circumstances when you use the
ampersand syntax (ie when you're requesting a member by its key), because of
the keys you've chosen for these members.

"Mark Bateman" wrote:

Hi Chris,

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...

"Chris Webb" wrote:

Hi Mark,

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.

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 ],
[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...

==================================
"Chris Webb" wrote:

Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
  #10  
Old   
Mark Bateman
 
Posts: n/a

Default RE: ampersand in mdx - 01-12-2005 , 09:53 AM



The cube I'm accessing the 'Member Keys Unique' property on the time.fiscal
dimension was set to false. This dimension contains 4 levels starting with
Year, Period, Week Number and Date. I've now set the 'Member Keys Unique'
property of the Date level to true. (Years property is disbled and the other
two gave an error after I processed the dimension and tried to re-process the
cube)

I can set the 'Member Keys Unique' property for the Date level to true.


"Chris Webb" wrote:

Quote:
Certainly the same MDX works when you run it using PTS on own machine, as
when you're using MDX Sample app, but when you run it through XMLA then PTS
is actually running on the server (and possibly using different connection
string properties, etc). The reason I'm suggesting you change the keys you're
using is that other people on this ng have had the same problem and not been
using XMLA, and it always seems to have been caused by their choice of key.
Unfortunately I can't test this myself because I don't have an install of
XMLA handy at the moment.

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?

"Mark Bateman" wrote:

Maybe so, but it can't be denied that the exact same pasted mdx code works
when pointing to the cube using ProClarity or the sample MDX app. Once the
ampersand is excluded, my test app works. Maybe I need to set up something at
the IIS side that caters for ampersands? Then again I'm only clutching at
straws.

Have you tried testign this yourself? Can you pass ampersands?

Cheers again,

Mark...

"Chris Webb" wrote:

I'm not sure it's that the ampersand isn't allowed, I think it is because AS
is having trouble locating members in some circumstances when you use the
ampersand syntax (ie when you're requesting a member by its key), because of
the keys you've chosen for these members.

"Mark Bateman" wrote:

Hi Chris,

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...

"Chris Webb" wrote:

Hi Mark,

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.

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 ],
[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...

==================================
"Chris Webb" wrote:

Does replacing the ampersand with the escape sequence:
&
make it work? Does the MDX work when you run it in MDX Sample app?

Chris

"Mark Bateman" wrote:

I'm passing mdx statements to our Windows 2003 Analysis Server via xmla
(datsource is the url to the Msxisapi.dll on the AS machine).

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...

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.