none
Trubles with using 'GO' between commands in MDX

    Question

  • Hi All,

    I am working on custom made reporting toll which uses SUBCUBE commands in order to filter the cube according to the user selection. Now, we have situation like this:

    CREATE SUBCUBE [NIS Sales] AS

    SELECT

    (

    {

    [Seller].[Seller Key].&[{97D04B16-C3CB-4F43-95A6-A8CDDB89D103}]

    },

    {

    [Item].[Family Code].&[NO090000]

    },

    {

    [Item].[Price Group].&[00000091]

    }

    )

    on 0 from [NIS Sales]

    GO

    CREATE SUBCUBE [NIS Sales] AS

    SELECT

    (

    {

        TopCount( { [Item].[Article No].CHILDREN }, 200, [Measures].[Sales Current])

    }

    )

    on 0 from [NIS Sales]

    We have to create 2 SUBCUBES. When commands are written like this, everything works fine.

    But when we write them in one line than we have syntax error.   We are building this string dynamically from code. Is there any way to inform SSAS about the new line?

    Any help is appreciated, Thanks


    Klimentina



    • Edited by klimentina Wednesday, March 21, 2012 10:19 AM
    Wednesday, March 21, 2012 10:18 AM

Answers

  • Hello,

    SSAS / MDX don't support batch commands, you have to fire each MDX statement separatly.


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing

    • Marked as answer by klimentina Wednesday, March 21, 2012 10:47 AM
    Wednesday, March 21, 2012 10:21 AM