Build Query with MDX for BW cube

Hi All ,
I need to build a MDX query
I need to pass range of values from select options in the where clause .
thanks in advance for Any inputs .
Vinay Kolla

Classic Crystal Reports and Classic SAP connectivity questions
Classic Crystal Reports and Classic SAP connectivity questions

Similar Messages

  • Compile build.xml with Ant for web service with annotations

    Hi Friends,
    I have a web service with annotations, using javax.annotation.PostConstruct, and javax.annotation.PreDestroy.
    I have a build.xml to create a EAR for this web service.
    When I run the ant task, the build complete successfully but the .war file cannot be deployed on the WLS server. Taking a closer look, I see that the required files such as, webservices.xml, weblogic.xml, weblogic-webservices.xml, Provision.wsdl files are not generated.
    Following is the build.xml file:
    <?xml version="1.0" encoding="windows-1252" ?>
    <project default="jwsc">
    <property file="build.properties"/>
    <property name="weblogic.jar.classpath"
    value="C:/bea_jDev/wlserver_10.3/server/lib"/>
    <property name="oimclient.jar.classpath"
              value="C:/_data/Project_Dc/OIM_jars" />
         <property name="com.jar.classpath" value="C:/JDeveloper/mywork/Service_Test/lib" />
    <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
    <classpath>
    <path id="weblogic.classpath">
    <pathelement path="WEBLOGIC_HOME"/>
    <fileset dir="${weblogic.jar.classpath}">
    <include name="**/*.jar"/>
    </fileset>
    </path>
    </classpath>
    </taskdef>
    <target name="all" depends="clean,build-service,deploy"></target>
    <target name="build-service">
         <jwsc srcdir="${src.home}" destdir="ear_directory" >
    <classpath>
    <path id="oim.classpath">
    <pathelement path="OIM_HOME"/>
    <fileset dir="${oimclient.jar.classpath}">
    <include name="**/*.jar"/>
    </fileset>
    <fileset dir="${com.jar.classpath}">
    <include name="**/*.jar"/>
    </fileset>
    </path>
    </classpath>
    <jws file="${jws.home}" type="JAXWS" />
    </jwsc>
    </target>
    <target name="deploy">
    <!--add wldeploy task here -->
    </target>
    <target name="clean">
    <delete dir="output" />
    </target>
    </project>
    Can you please point out what else is to be done and where exactly am I going wrong in writing the build.xml file.
    Let me know if some else information is required.

    This is what I get when I run the ant task:
    Buildfile: C:\JDeveloper\mywork\ProvisioningService_Test2\Provision\resource\build.xml
    build-service:
    [jwsc] JWS: processing module /com/fox/provision/webservice/endpoint/impl/ProvisionEndPointImpl
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /com/.../provision/webservice/endpoint/impl/ProvisionEndPointImpl
    [jwsc] [JAM] Warning: failed to resolve class org.apache.xmlbeans.XmlObject
    [jwsc] [JAM] Warning: failed to resolve class com.bea.xml.XmlObject
    [jwsc] [JAM] Warning: failed to resolve class javax.xml.rpc.holders.Holder
    [jwsc] JWS: C:\..\...\..\...\code\ProvisioningService\src\com\...\provision\webservice\endpoint\impl\..EndPointImpl.java Validated.
    [jwsc] Processing 1 JAX-WS web services...
    [jwsc] warning: Specified AnnotationProcessorFactory, 'com.sun.istack.ws.AnnotationProcessorFactoryImpl', not found on search path.
    warning: No annotation processors found but annotations present.
    2 warnings
    [jwsc] Compiling 2 source files to C:\DOCUME~1\....\LOCALS~1\Temp\_lsgijm
    [jwsc] Building jar: C:\..\...\..\...\code\ProvisioningService\src\com\...\provision\webservice\deploy\ear_directory\com\fox\provision\webservice\endpoint\impl\...EndPointImpl.war
    [jwsc] Created JWS deployment outputFile: C:\..\...\..\...\code\ProvisioningService\src\com\...\provision\webservice\deploy\ear_directory\....\...\provision\webservice\endpoint\impl\..EndPointImpl.war
    [jwsc] [EarFile] Application File : C:\..\...\..\...\code\ProvisioningService\src\com\.....\provision\webservice\deploy\ear_directory\META-INF\application.xml
    [AntUtil.deleteDir] Deleting directory C:\DOCUME~1\....\LOCALS~1\Temp\_lsgijm
    BUILD SUCCESSFUL
    Total time: 7 seconds
    Due to some limitations, I edited the path in the build.xml files.
    Please let me know what can be done. Thanks.
    Edited by: user9112073 on Nov 22, 2011 9:52 PM

  • Huge query  with  parameter for to use Dynamic Cursor with Parameters

    Hi
    Is possible put the query below like dynmic cursor passing Parameters ?
    How can I do it ?
        OPEN P_CURSOR FOR
        WITH NOTIFICACAO AS(
          SELECT 
           t1.cd_consultora,
           t1.dc_nome_consultora,
           t2.nm_notificacao_cn,
           t2.dt_notificacao_cn dt_notificacao,
           t2.dt_atendimento_notificado,
           t1.cd_tipo_estrutura_comercial,
           t1.cd_estrutura_comercial
            FROM t_consultora t1, nc.t_nc_notificacao_cn t2
           WHERE t2.dt_notificacao_cn BETWEEN w_DTA_INI AND w_DTA_FIM
             AND t2.cd_consultora = t1.cd_consultora
             AND t1.cd_setor = w_cd_setor
             AND t1.cd_tipo_estrutura_comercial = p_tp_estrutura_comercial
             AND t1.cd_estrutura_comercial = p_cd_estrutura_comercial),
        T_NOTIFICADA AS ( select Count(t1.nm_notificacao_cn) over (partition by  t1.cd_consultora,t1.nm_notificacao_cn ) QTD_NOTAS,
                                 Count(t2.nm_item_notificacao_cn) over (partition by  t1.cd_consultora,t1.nm_notificacao_cn ) QTD_ITENS,
                                 T3.*
                                  from nc.t_nc_notificacao_cn t1,
                                       nc.t_nc_item_notificacao_cn  T2,
                                       NOTIFICACAO                  T3 
                                   where       t1.dt_notificacao_cn >= to_date('01/09/2006','dd/mm/yyyy')
                                    and   t3.nm_notificacao_cn = t1.nm_notificacao_cn
                                   and    t1.nm_notificacao_cn = t2.nm_notificacao_cn
                                   and    ((t2.cd_tipo_item_nc = 4 and t2.cd_subtipo_item_nc = 6)
                                           or t2.cd_tipo_item_nc = 2 or t2.cd_tipo_item_nc = 3)
                                           and t3.cd_consultora = t1.cd_consultora (+)  )  ,
        T_BLOQUEADA AS ( SELECT T4.* FROM
                     (SELECT  T3.*,
                            CASE WHEN T3.BLOQUEADA = -1 THEN  'Bloqueada'
                                 WHEN  T3.BLOQUEADA = 0 THEN
                              (CASE WHEN T3.QTD_NOTAS > 2 THEN
                                 CASE WHEN T3.QTD_ITENS > 8 THEN 'Atencao / Analise'
                                 ELSE
                                    'Normal'
                                 END
                               ELSE
                                 'Atencao / Analise'   
                              END)
                             END OBSERVACAO
                      FROM  (SELECT CASE WHEN NVL(T2.ID_CN_BLOQUEADA,1) = 1 then -1
                                   WHEN NVL(T2.ID_CN_BLOQUEADA,1) = 0  THEN 0
                                   END BLOQUEADA, T1.*
                        FROM   T_NOTIFICADA T1,
                               T_PS_CONSULTORA T2 
                               WHERE T1.CD_CONSULTORA = T2.CD_PESSOA)T3) T4 )
            select *
              from (SELECT t1.*, ROWNUM r_linha
               FROM (SELECT  cd_consultora,
                       dc_nome_consultora,
                       fnc_busca_telefone(CD_CONSULTORA, 1) TELEFONE1,
                       fnc_busca_telefone(CD_CONSULTORA, 2) TELEFONE2,
                        EMAIL,
                        observacao,
                       nm_notificacao_cn,
                       nvl(vl_total_final,0) vl_total_final,                  
                       dt_notificacao,
                       qt_produto_item_nc,
                      sg_notificacao,
                      ID_SITUACAO,
                       qtd_registros
                    FROM (SELECT /*+ INDEX(W5 I0_NC_TIPO_ITEM_NC) */
                       W1.cd_consultora,
                       W1.dc_nome_consultora,
                       fnc_busca_telefone(w1.CD_CONSULTORA, 1) TELEFONE1,
                       fnc_busca_telefone(w1.CD_CONSULTORA, 2) TELEFONE2,
                       fnc_busca_email(w1.CD_CONSULTORA) EMAIL,
                       W1.OBSERVACAO observacao,
                       W1.nm_notificacao_cn,
                       sum(W4.qt_produto_nf *
                           W4.vl_unitario_final_produto_nf) OVER(PARTITION BY W1.cd_consultora, W1.nm_notificacao_cn) vl_total_final,
                       W1.dt_notificacao,
                       sum(W4.qt_produto_nf) OVER(PARTITION BY W1.cd_consultora, W1.nm_notificacao_cn) qt_produto_item_nc,
                       'PENDENTE' sg_notificacao,
                       W5.dc_tipo_item_nc ID_SITUACAO,
                       W_qtd_registros qtd_registros
                        FROM T_BLOQUEADA               W1,
                             nc.t_nc_item_notificacao_cn W2,
                             nc.t_nc_produto_item_nc     W3,
                             nc.t_nc_produto_item_nf     W4,
                             nc.t_nc_tipo_item_nc        W5
                       WHERE W1.dt_atendimento_notificado is null
                         and W1.nm_notificacao_cn =
                             W2.nm_notificacao_cn
                         and W2.cd_tipo_item_nc = W5.cd_tipo_item_nc
                         and W2.nm_notificacao_cn =
                             W3.nm_notificacao_cn(+)
                         and W2.nm_item_notificacao_cn =
                             W3.nm_item_notificacao_cn(+)
                         and W3.nm_notificacao_cn =
                             W4.nm_notificacao_cn(+)
                         and W3.nm_item_notificacao_cn =
                             W4.nm_item_notificacao_cn(+)
                         and W3.nm_sequencia_produto_item_nc =
                             W4.nm_sequencia_produto_item_nc(+)
                         and W2.cd_tipo_item_nc not in (6, 7)
                         and ((W2.id_situacao_item_nc = 1) OR
                             (W2.id_situacao_item_nc = 3 OR
                             W2.id_solucao_definida is not null))
                      UNION
                      SELECT /*+ INDEX(W5 I0_NC_TIPO_ITEM_NC) */
                       W1.cd_consultora,
                       W1.dc_nome_consultora,
                       fnc_busca_telefone(w1.CD_CONSULTORA, 1) TELEFONE1,
                       fnc_busca_telefone(w1.CD_CONSULTORA, 2) TELEFONE2,
                       fnc_busca_email(w1.CD_CONSULTORA) EMAIL,
                       W1.OBSERVACAO observacao,
                       W1.nm_notificacao_cn,
                       sum(W4.qt_produto_nf *
                           W4.vl_unitario_final_produto_nf) OVER(PARTITION BY W1.cd_consultora, W1.nm_notificacao_cn) vl_total_final,
                       W1.dt_notificacao,
                       sum(W4.qt_produto_nf) OVER(PARTITION BY W1.cd_consultora, W1.nm_notificacao_cn) qt_produto_item_nc,
                       'ATENDIDO' sg_notificacao,
                       W5.dc_tipo_item_nc ID_SITUACAO,
                       W_qtd_registros qtd_registros
                        FROM T_BLOQUEADA                W1,
                             nc.t_nc_item_notificacao_cn W2,
                             nc.t_nc_produto_item_nc     W3,
                             nc.t_nc_produto_item_nf     W4,
                             nc.t_nc_tipo_item_nc        W5
                       WHERE W1.dt_atendimento_notificado is not null
                         and W1.nm_notificacao_cn =
                             W2.nm_notificacao_cn
                         and W2.cd_tipo_item_nc = W5.cd_tipo_item_nc
                         and W2.nm_notificacao_cn =
                             W3.nm_notificacao_cn(+)
                         and W2.nm_item_notificacao_cn =
                             W3.nm_item_notificacao_cn(+)
                         and W3.nm_notificacao_cn =
                             W4.nm_notificacao_cn(+)
                         and W3.nm_item_notificacao_cn =
                             W4.nm_item_notificacao_cn(+)
                         and W3.nm_sequencia_produto_item_nc =
                             W4.nm_sequencia_produto_item_nc(+)
                             )T2
    ---- here with NDS   I changed order by
                       ORDER BY DECODE(p_nm_asc_desc,0,DECODE(p_nm_col_ordem ,1, cd_consultora,2,dc_nome_consultora)) ASC, --,8,vl_total_final)) ASC,
                       DECODE(p_nm_asc_desc,1,DECODE(p_nm_col_ordem ,1, cd_consultora,2,dc_nome_consultora)) desc --,8,vl_total_final)) DESC
                             ) T1
               where rownum <= W_TO_REC)
             where r_linha >= W_FROM_REC;Is It Query very much great and how can I to pass parameters w_DTA_INI ,w_DTA_FIM, W_TO_REC,W_FROM_REc ....etc
    TIA

    I did (some time ago and it was a packaged procedure) something like
    Procedure p(p_one in datatype,p_two in datatype,p_dataset out sys_refcursor) is
      the_sql varchar2(32000);
      the_cursor sys_refcursor;
    begin
      the_sql = 'WITH NOTIFICACAO AS( ' ||
                '      SELECT ' ||
                '       t1.cd_consultora, ' ||
                '                               where       t1.dt_notificacao_cn >= to_date(''01/09/2006'',''dd/mm/yyyy'') ' ||  -- note the ''
                '           where rownum <= :W_TO_REC) ' ||   -- parameter 1
                '         where r_linha >= :W_FROM_REC ';     -- parameter 2
      open the_cursor for the_sql using p_one,p_two;  -- just by the book
    end p;if I remember correctly
    Regards
    Etbin

  • Query with BAPI_PO_CREATE1 for Partial Service PO.

    Dear Experts,
    I am unable to create a Partial Service PO with BAPI_PO_CREATE1. No matter the Qty specified, in the field POSERVICES-QUANTITY; the Service PO gets created with the Qty specified in the RFQ.
    For your ref, the sample ABAP code is as below:
    "The PR has 2 line items, a coded Service and another uncoded service.
    "The internal table service_data is filled by us for testing.
    LOOP AT service_data.
    MOVE service_data-introw TO poservices-line_no.
    MOVE service_data-extrow TO poservices-ext_line.
    MOVE service_data-srvpos TO poservices-service.
    MOVE service_data-order_qty TO poservices-quantity.
    APPEND poservices.
    ENDLOOP.
    The BAPI executes successfully and a Transaction Commit is also used for PO creation.
    Kindly, let us know for any specific fields that needs to be passed to POITEM, POSERVICES or any other BAPI parameters that I have missed out.
    Regards,
    Yogesh.

    Dear Yogesh,
    The moment you give the reference of a quotation for Service PO Creation, the Service PO created will always be of the quantity of the quotation. That's because in Service PO Quotation maintenance, the gross price of the service is calculated as rate*quantity. Now, the addition of this Service Gross Price of all the sub-line items of the Service becomes the Basic Price for the corresponding line item.
    Hence, any change in quantity in the quotation and the PO created through BAPI with quotation as reference will be in contradiction.
    The only option is to create a PO and then amend it.
    Regards,
    Pranav.

  • Building query with multiple contentsource

    I have to put a condition in SP2013 Search for searching multiple contentsource together in a query , currently i am using 
    contentsource:col1 AND contentsource:col2 AND contentsource:col3
    Is there any possibility where i can add this as contentsource:col1,col2,col3
    since sometimes  i have to search in 70 content sources together as well.

    Hi,
    I recommend to use FAST Query Language (FQL) syntax to achieve this goal.
    To achieve your goal, please check if the query below can work:
    contentsource: AND(col1, col2, col3).
    More reference about FQL in SharePoint 2013 search:
    http://msdn.microsoft.com/en-us/library/office/ff394606(v=office.15).aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Build and Drop Indices for Info Cube

    Hi,
    How or Where can we Build Indices and Drop Indices on Info Cube?
    Thanks & Best Regards,
    Venkata.

    Hi Venkata,
    Although you can, you don't have to do it manually, you can add these process (drop index and build index) to the process chain where you load the InfoCube.
    If you don't how pass me your email and I send a document.
    regards,
    Sebastián.-

  • Flash Builder Burrito with Hero RUN disappears

    In trying to complete the Flex-In-A-Week tutorial series, I found it necessary to install Flash Builder Burrito with Hero for the "professional" features of the network monitor. The install went fine and on first opening the interface looks fine including the |> RUN button being visible.
    When I define a new workspace using Switch workspace to where the FIAW files are and open the lesson I am working on the |> RUN button disappears and there is no way to run the code. I can't find any way to get the run button back. I may have to abandon the trail and return to the Flash Builder standard that came with CS5 Web and give up on the network monitor. someone please help.

    does anyone know of a replacement for the network monitor? so i can run the standard version.
    http://www.riaspace.com Piotr Walczyszyns' Toaster Lite says it does but I can't figure out how to integrate it into the Flash Builder work flow to use as easilly as network monitor appears to work.
    Any suggestions would be appreciated.

  • MDX for a BEx query with a characteristic structure

    Hi,
    I have a BEx query with a characteristic structure in the rows.
    Material     Structure     Measure1
    a-Material     a-Structure     ....
    a-Material     b-Structure     ....
    b-Material     a-Structure     ....
    b-Material     b-Structure     ....
    I am looking to run the query via MDX. Is that possible? If yes, how should be the mdx statement.
    Thank you in advance for your help.
    Regards,
    McGreen

    Hi,
    it will work, so long as you also include the Structure object in the WebI Query panel as a results objects.
    the SELECT syntax is much the same as a 'normal' MDX statement.
    the quickest way to tell them appart is how the Measures are called. normally, it starts:   SELECT [MEASURE.ABC123] NONEMPTY(CROSSJOIN( ...   ) )
    however, when you have a Structure, all the declarations from the start of the statement looks like : SELECT [ABC123.ABC123] NONEMPTY(CROSSJOIN( ...   ) )
    i hope this helps.
    Regards,
    H

  • An error has occurred during report processing. (rsProcessingAborted). Query execution failed for dataset 'DimUserWorkCentre'. (rsErrorExecutingCommand). The Cube either does not exists or has not been processed

    Hi,
    I'm having issues with the report created using SSAS cube.
    An error has occurred during report processing. (rsProcessingAborted)
    Query execution failed for dataset 'DimUserWorkCentre'. (rsErrorExecutingCommand)
    The Operator_Performance cube either does not exist or has not been processed.
    I have searched through internet and tried all the solutions, but didn't worked for me.
    SSRS services running as NETEWORK SERVICE user.
    SSRS Execution running as a Different user, which is the login is used to logon ot that server. I have also verified this user has access to database. I'm using Shared DataSource(SSAS Source) for this report.
    Can any one please help me.
    Thank You,
    Praveen.
    Praveen

    Hello,
    Have you tried it to execute on report manager , Is your data source properly configured in Report Manager  and your report is mapped with Datset correctly?
    Have you executed the Dataset query MDX editor  now?
    What is the volume of data you are fetching in the report. Try it to execute in other than IE , I don't know the exact reason but some of our report with large volume of data  are failing on IE , on the other hand these reports are running fine Google
    Chrome
    blog:My Blog/
    Hope this will help you !!!
    Sanjeewan

  • MDX query with a DMX query

    Hi All,
    Do I have a way to run a MDX query with a DMX query? (Avoiding the “link server” options… )
    I need to get the cube last update date like this DMX query:
    SELECT 1
    as CubeStatus
    FROM $System.MDSCHEMA_CUBES
    where 
    format(LAST_DATA_UPDATE,
    'dd/MM/yyyy') = format(now(),
    'dd/MM/yyyy')  --"1" means that the cube was processed, NULL cube did not process today
    and cube_source = 1
    and cross reference it to a result I get from this MDX query:
    with
    member measures.LastDateCube
    as [Comm Date UTC].[Date].currentmember.PROPERTIES("KEY")
    select measures.LastDateCube
    on 0 from comms
    the purpose of this is to know for sure that my current member (date integer) is equal to the cube last update date. thus, making sure the cube was processed and I get the correct member I expect.
    What do you think?
    Thank you
    Yoni.

    Hi yonibiel,
    According to your description, you want to combine a DMX query with a MDX query. Right?
    In SQL Server, it is not supported to parse the MDX query without connecting the SSAS database server. So if you want to combine the DMX and MDX query into one dataset, the only way is using linked server to SSAS in openquery() function.
    In this scenario, if you render these data from two result sets for reporting purpose, I assume you using SSRS, you can create two datasets and use lookup() to combine data fields from two datasets into one data region.
    Reference:
    Joining the results of two MDX queries together
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Error MDX when executing WBI query with different prompt but same text

    Current version is BO XI 3.1 SP2 FP 2.6
    Connected with SAP BI7
    Identified problem :
    when using same text prompt in different filters, only the first one is correctly answered, the MDX code for following ones are not correctly generated : the engine uses the right filter but applied to the object from the first filter which gives a MDX code error.
    Example :
    In a report :
    - asking a user choice on 'document month' for operational view
    - using the same answer to fill up the 'posting month' in financial view
    Document month (0FISCPER) filter is filter !V000001
    Posting month (FISCPLCD) filter is filter !V000002
    Question text is unique : "Single Year Period ?" and should be sent to both prompts/variable.
    When using the same text prompt, the MDX code generated is :
    SELECT  { [Measures].[4IUX93YJGXQEHGLX0T0GPNA9Y] }  ON COLUMNS , NON EMPTY CROSSJOIN( [0FISCPER].[LEVEL01].MEMBERS, [FISCPLCD].[LEVEL01].MEMBERS ) DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS FROM [CATS_M01A/ZGL_CATS_UTILISATION] SAP VARIABLES [!V000001] INCLUDING [FISCPLCD].[Z12010006]
    Please notice that in this generated code, the filter !V000001 is applied to the FISCPLCD object, while filter !V000001 is related to document month. A MDX error is generated.
    Any clue to solve this issue ?
    Thank you for your help.
    G.OM.
    Edited by: GERALDINE OMNES on Jan 14, 2011 12:44 PM

    Ok, I've simplified the case.
    Here is the real case :
    Object filter =
    Based on object =
    .[LEVEL01]
    Object filter =
    Based on object =
    .[LEVEL01]
    In WBI query result I take these objects :
    .[LEVEL01]
    .[LEVEL01]
    .[4IUX93YJGXQEHGLX0T0GPNA9Y]
    In query filters, my 2 filters with same text :
    1.
    I run the query.
    Answer to question 'Single Year Period ?' = Period 06 2010
    ==> MDX error
    A database error occured. The database error text is: Echec de l'exécution de la requête MDX SELECT  { .[4IUX93YJGXQEHGLX0T0GPNA9Y] }  ON COLUMNS , NON EMPTY CROSSJOIN( .[LEVEL01].MEMBERS, .[LEVEL01].MEMBERS ) DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS FROM SAP VARIABLES INCLUDING .[Z12010006] INCLUDING .[Z12010006] avec l'erreur Invalid MDX command with . (WIS 10901)
    And you can see that the value sent to both filters is the same and come from the first filter .[Z12010006] instead of applying the value to each filter .[Z12010006] for the first one and .[Z12010006] for the second one.
    Please, notice that if I change the order of this 2 filters in the WBI query, the MDX generated become :
    SELECT  { .[4IUX93YJGXQEHGLX0T0GPNA9Y] }  ON COLUMNS , NON EMPTY CROSSJOIN( .[LEVEL01].MEMBERS, .[LEVEL01].MEMBERS ) DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS FROM SAP VARIABLES INCLUDING .[Z12010006] INCLUDING .[Z12010006]
    Thanks for your help.
    G.OM.

  • Query Builder problem with saving to SQL text file

    When developing an SQL statement in Query Builder and saving it for later use, one has the option of saving in .SQL file extension. However, this file can not be used by the data wizard of Oracle*Reports because it contains non-ascii text. It appears that the Query Builder saves commands as binary tokens rather than in ascii text.
    This makes it impossible to use Query Builder in place of Oracle*Report's data wizard's query builder with which to build and save SQL statements.

    as i posted earlier .. queryBuilder as a stand alone product is neither supported nor available anymore. it is only available as part of the report data wizard.
    thanks,
    ph.

  • Help with building query

    Hi ALl,
    Below is a code sample. My question is how to build the query in the for loop of public procedure to call all the private proedures (private_1,private_2,private_3 etc.)
    PACKAGE SAMPLE AS
    procedure public(start IN integer, end IN integer)
    END;
    PACKAGE BODY SAMPLE IS
    procedure private_1()
    BEGIN
    END
    procedure private_2()
    BEGIN
    END
    procedure private_3()
    BEGIN
    END
    procedure public(start IN integer, end IN integer)
    BEGIN
    for num in start..end loop
    private_ || to_char(num); ?????????????????????????
    end loop
    END
    END;

    Actually, you can build dynamic PL/SQL and execute it via 'execute immediate':
    execute immediate 'begin private_' || to_char(num) || '; end;';But...it will not help in this case because the NDS is executed outside of the scope of the package - it cannot see the private procedures, and it cannot even see public procedures unless you preface the procedure with the package name.

  • Help with MDX Query Result weirdness

    Hi,
    Feels like I'm posting a question every other day, hope I don't wear out my welcome.
    So I have a working query :
    with
    MEMBER Measures.[EmailCount] as IIF(ISEMPTY([Measures].[Tran Count]), 0 ,[Measures].[Tran Count])
    MEMBER Measures.AdvGroupTotal as
    SUM (EXISTING ([Dim IFA Details].[Parent Key].[Adviser Group] ,
    [Dim Date].[Fiscal].[Fiscal Year].&[FY 13/14]) , Measures.[Amount])
    MEMBER [Measures].[Income Range] as
    CASE
    WHEN Measures.AdvGroupTotal <= 10000 THEN '0-10000'
    WHEN Measures.AdvGroupTotal <= 50000 THEN '10001-50000'
    WHEN Measures.AdvGroupTotal <= 100000 THEN '50001-100000'
    WHEN Measures.AdvGroupTotal <= 200000 THEN '100001-200000'
    else '200000-'
    end
    SELECT { [Measures].[Amount] , Measures.[EmailCount], Measures.AdvGroupTotal, measures.[income range]}
    ON COLUMNS,
    [Dim IFA Details].[Parent Key].[Adviser Group].Members * [Dim Date].[Fiscal Quarter].children
    having Measures.AdvGroupTotal > 100
    on rows
    FROM [Income and Emails Cube]
    where
    ([Dim Date].[Fiscal].[Fiscal Year].&[FY 13/14]
    Great, gives me back what I expect
    So now I'm thinking, actually let's lose the Adviser Groups and just have it by Fiscal Quarter and Income Range, dropping that I lose my income range and get this:
    I figured its related to Income Range being a measure, so I tried making income range a calculated member of a dimension
    with
    MEMBER Measures.[EmailCount] as IIF(ISEMPTY([Measures].[Tran Count]), 0 ,[Measures].[Tran Count])
    MEMBER Measures.AdvGroupTotal as
    SUM (EXISTING ([Dim IFA Details].[Parent Key].[Adviser Group] ,
    [Dim Date].[Fiscal].[Fiscal Year].&[FY 13/14]) , Measures.[Amount])
    MEMBER [Dim IFA Details].[Parent Key].[Income Range] as
    CASE
    WHEN Measures.AdvGroupTotal <= 10000 THEN '0-10000'
    WHEN Measures.AdvGroupTotal <= 50000 THEN '10001-50000'
    WHEN Measures.AdvGroupTotal <= 100000 THEN '50001-100000'
    WHEN Measures.AdvGroupTotal <= 200000 THEN '100001-200000'
    else '200000-'
    end
    SELECT { [Measures].[Amount] , Measures.[EmailCount], Measures.AdvGroupTotal}
    ON COLUMNS,
    ( [Dim Date].[Fiscal Quarter].children, [Dim IFA Details].[Parent Key].[Income Range] )
    on rows
    FROM [Income and Emails Cube]
    where
    ([Dim Date].[Fiscal].[Fiscal Year].&[FY 13/14]
    This then came back with some unexpected results:
    The amount and email count are now the Income Range and still didnt get the income grouping I want.
    What am I doing wrong?
    Thanks for reading.
    Regards
    Jon

    Hi JLJ1976,
    According to your description, you have some issue when changing the measure into a dimension member. Right?
    In this scenario, the reason why you get the incorrect result set is you make a measure into dimension member. In your query, the Income Range is based on the Measure AdvGroup Total, and the AdvGroup Total value depends on how your dimension slice the cube.
    If you slice the cube on date members, you will get a much smaller AdvGroup Total value. So the Measure XXX return dynamic values because it always based on dimension slicer. For dimension members, they should be static values appear on axis to slice the cube
    data on a data. So you should make the Income Range into a calculated measure because it's based on a Quarter sliced Measure. Otherwise, it will return null value (in your query, it's the else part result) because you are measuring a measure.
    For more explanation about dimensions and Measures, please refer to links below:
    Measures and Measure Groups
    Introduction to Dimensions (Analysis Services - Multidimensional Data)
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Building Query for SharePoint content Search Webpart

    Hi,
    There is a content search webpart being used for displaying the Related Items from a Page library. Whenever a new item/Page is added into the Page library, there is a column that accepts multiple values.
    Now my requirement is, when a new page is added (which would be a part of custom page layout which has Search webpart) with a Column named say for Ex: 'Status' values as New, Old, Newer and when this page is opened, I want the search web part to display
    all other items/pages whose 'Status' column values would have one among these.
    As I do not have any idea on building the query with this webpart, any help/suggestions would be greatly appreciated.

    Dipti,
    How about replacing you line as below (with content class)
    var newQuery = 'ContentTypeId:0x0102*'+ ' ' +'EndDate'+ '>=' + date;
    with
    var newQuery = 'contentclass:STS_ListItem_Events'+ ' ' +'EndDate'+ '>=' + date;
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

Maybe you are looking for