dbTalk Databases Forums  

Running MDX create statement inside of XMLA

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


Discuss Running MDX create statement inside of XMLA in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jesse O.
 
Posts: n/a

Default Running MDX create statement inside of XMLA - 11-03-2006 , 01:12 PM






While the MDX is valid and complies when running it as MDX, it does not
compile when ran inside of XMLA

It doesn't like the <> and throws an error "Illegal qualified name
character"


Any ideas?

CREATE MEMBER CURRENTCUBE.[MEASURES].[% Change]

AS Iif([Measures].[Prior Period Daily Spend] <> 0 and NOT
IsEmpty([Measures].[Prior Period Daily Spend]),([Measures].[Current Period
Daily Spend]-[Measures].[Prior Period Daily Spend])/[Measures].[Prior Period
Daily Spend], NULL),

FORMAT_STRING = "Percent",

VISIBLE = 1 ;



Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Running MDX create statement inside of XMLA - 11-03-2006 , 03:51 PM






Since this is text within XML tags, you need to escape <>, like:

AS Iif([Measures].[Prior Period Daily Spend] &lt;&gt; 0 and NOT


http://www.w3.org/International/questions/qa-escapes
Quote:
FAQ: Using character entities and NCRs
...
When to use escapes

Syntax characters. There are three characters that should always appear
in content as escapes, so that they do not interact with the syntax of
the markup. These are part of the language for all documents based on
XML and for HTML.

&lt; (<)

Quote:
(>)
&amp; (&)

...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #3  
Old   
Jesse O.
 
Posts: n/a

Default Re: Running MDX create statement inside of XMLA - 11-03-2006 , 04:06 PM



ahh, much appreciated

"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> wrote

Quote:
Since this is text within XML tags, you need to escape <>, like:

AS Iif([Measures].[Prior Period Daily Spend] &lt;> 0 and NOT


http://www.w3.org/International/questions/qa-escapes

FAQ: Using character entities and NCRs
..
When to use escapes

Syntax characters. There are three characters that should always appear
in content as escapes, so that they do not interact with the syntax of
the markup. These are part of the language for all documents based on
XML and for HTML.

&lt; (<)

(>)

&amp; (&)

..



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***



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.