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

Similar Messages

  • Can we put Join Query with Expdp in Query Parameter

    Dear All
    Can we put join condition like
    A.roll_no=B.roll_no
    in query clause of EXPDP utility of Oracle 10g.
    My parameter file is
    INCLUDE=TABLE:"IN ('A','B')"
    QUERY ="where roll_no between 1 and 100 "
    then it works and export the data. But I want Above condition.
    But when I specify it gives ORA-39001 error.
    If possible, How and Can you specify example.
    Regards
    Nikhil

    Hello,
    Please check if OSS note 858458 is applicable in your case.
    Regards,
    Praveen

  • Using sql query with parameter

    OK, I can't find any docs on this. I can insert a parameter, but how do I insert that into the sql query?

    Your first post asked how to insert a paremeter into a SQL. My example shows a value read query with a SQL function, but any SQL will work with any Query in the same pattern.
    a) You call the query with session.executeQuery(query, vectorOfArguments);
    b) You use #argument in the SQL string and then query.addArgument("argument");
    c) You pass them in a Vector of the order in which you do the addArgument's.
    - Don

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

  • 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

  • Using Bex Query with cell definition with WEBI

    Hi,
    Currently I am using a Bex query as a datasource for a webi, normally this works ok but I am having trouble with one particular query.
    This query has cell definitions defined in the query. When i import the query into WEBI I get an MDX error.
    Any suggestions?
    Thanks
    Flash

    Hi,
    We do not see all elements of the BW query in the universe, just those not using cell definitions.
    We are currently on Business objects XI 3.1
    Using BW 3.5
    And the query runs fine using RSRT, it does show some asterix for some of the values but this can be removed by filtering on currency type in BW report
    Thank You,

  • Results of DMX query

    I have this DMX query, which is written for Neural network model:
    select t.*, predict ([module])
    as [predictedvalue],vba!format
    (predictprobability ([module]),'Percent')
    as [probability] from [Neuronske mreže]
    prediction join openquery ([moodle baza],
    'select distinct Course from [dbo].[log] ')
    as t on [Neuronske mreže].[Course]=t.Course
    order by PredictProbability([Module]) desc
    And I get results, but just one Module for one Course. Even if I remove "distinct", results show more same results for one course.
    For example:
    Course        Predicted Value       Probability
    32                Forum                        95%
    But, on the course 32 there are more Predicted values, and I want to show them all, with their probability.
    How could I do it?
    Thank you in advance

    For this DMX, course 32 will only have one output.  If your original list has more than one course, then each individual course would have its own predicted value and probability.
    Mark Tabladillo PhD (MVP, SAS Expert; MCT, MCITP, MCAD .NET) http://www.marktab.net

  • How to Generate a MDX statement using a BEX query

    Hello,
    Is there any possiblity in BW to generate a MDX statement using a BEx query?
    Thanks,
    Ravi

    BW does not generate any MDX statement for Bex query.I have tried ample number of times to acheive this but failed.
    Like an Infocube the Query is also an object where in you can write MDX queries on BEx Queries.
    As it is I never found BW rendering MDX queries.But with MDX queries you can get something but how far it helps I don't know.
    RSCRM_BAPI is obsolete and it is recommended to use RSCRM_REPORT somewhere I have read ,but when I went to that transaction I never found that "MDX" button at all.
    It was converted to "OLAP Check" which gave me some warning on the key figures and that's it.
    Somehow I feel BW is not comfortable with MDX.
    Regs
    Gopi

  • How to create an ABAP Query with OR logical expression in the select-where

    Hi,
    In trying to create an ABAP query with parameters. So it will select data where fields are equal to the parameters entered. The default logical expression is SELECT.. WHERE... AND.. However I want to have an OR logical expression instead of AND.. how can I attain this??
    Please help me on this.. Points will be rewarded.
    Thanks a lot.
    Regards,
    Question Man

    Hi Bhupal, Shanthi, and Saipriya,
    Thanks for your replies. But that didn't answer my question.
    Bhupal,
    You cannot just replace AND with OR in an ABAP QUERY. ABAP QUERY is a self generated SAP code. You'll just declare the tables, input parameters and output fields to be displayed and it will create a SAP standard code. If you'll try to change the code and replace the AND with OR in the SAP standard code, the system will require you to enter access key/object key for that particular query.
    Shanthi,
    Yes, that is exactly what need to have. I need to retireve DATA whenever one of the conditions was satisfied.
    Saipriya,
    Like what I have said, this is a standard SAP code so we can't do your suggestion.
    I have already tried to insert a code in the ABAP query (there's a part there wherein you can have extra code) but that didn't work. Can anybody help me on this.
    Thanks a lot.
    Points will be rewarded.
    Regards,
    Question Man

  • Error while trying to Execute the Query with Customer Exit

    Hi Experts,
           I am having a Query with Customer Exit, it is working fine for all the Employess, except for one. When i try to remove the Customer Exit it is working for her too. Below is the error i am getting.
    system error in program SAPLLRK0 and form RSRDR; CHECK_NAV_INIT_BACK
    Thanks,
    Kris.

    Hello Kris,
    Are you working with multiprovider? Please check if OSS notes 813454,840080 or 578948 are applicable in your case.
    Regards,
    Praveen

  • Report on BEx query with 2 structures (one in rows and one in columns)

    Hi, experts! I have to make Crystall report on BEx query with 2 structures, one in columns (with KF's), and one in rows. Is it possible to create such report? Because when I create such report, I cant see fields in structures, only characteristics fields.
    Ok, I found samr problem in another thread. Sorry.
    Edited by: Mikhail Sychev on Dec 5, 2009 9:53 PM

    Hey Flora,
    Happy to hear that its working now.
    Answering your question, again its upto the connection and report format you are using. Based on your question i hope you your report output should be like this.
    You cannot map to two labels for the series, again this report format is possible only in cross tab through Webi. I would suggest you to concatenate the material and month in a dimension in webi like below.
    I have done the concatenation in excel level, i would suggest you to do that in webi. Try to reduce the formula as much in excel.
    or
    If you are using Query browser connection, then i would suggest you to create a separate report which will display the actual vs plan material wise, here you need to pass the material as a prompt.
    Hope this helps in clear, please revert me for any clarification.

  • Query with bind variable, how can use it in managed bean ?

    Hi
    I create query with bind variable (BindControlTextValue), this query return description of value that i set in BindControlTextValue variable, how can i use this query in managed bean? I need to set this value in String parameter in managed bean.
    Thanks

    Put the query in a VO and execute it the usual way.
    If you need to, you can write a parameterized method in VOImpl that executes the VO query with the parameter and then call that method from the UI (as a methodAction binding) either through the managed bean or via a direct button click on the page.

  • Report query with bind variable

    Trying to create a report query for xsl-fo print. For output format I pick "derive from item" then pick the item name from the list, on the next screen, I paste the query with the bind variable. on the next step test query, I always get "data not found" regardless what value I type in. This is the same query that I ran under sql commands without any issues.
    Does anyone run into the same issue as I have when attempted to create a query with bind var ? There is no problem creating a query without bind varibles. . thanks.
    Munshar

    Hi, please did you get any solution to this issue? I am having similar challenge right now.
    select     EMP.DEPTNO as DEPTNO,
         DEPT.DNAME as DNAME,
         EMP.EMPNO as EMPNO,
         EMP.ENAME as ENAME,
         EMP.JOB as JOB,
         EMP.MGR as MGR,
         EMP.HIREDATE as HIREDATE,
         EMP.SAL as SAL
    from     SCOTT.DEPT DEPT,
         SCOTT.EMP EMP
    where EMP.DEPTNO=DEPT.DEPTNO
    and      DEPT.DNAME =upper(:dname)
    This run perfectly in sql developer, toad, and even inside publisher if I login directly to publisher to create report.
    Generating this same query in shared component query builder and testing it returns no data found. If I remove the last line, it works. but with the last line, it return no data found. It seems no one has been able to provide solution to this issue

  • SQL query with Bind variable with slower execution plan

    I have a 'normal' sql select-insert statement (not using bind variable) and it yields the following execution plan:-
    Execution Plan
    0 INSERT STATEMENT Optimizer=CHOOSE (Cost=7 Card=1 Bytes=148)
    1 0 HASH JOIN (Cost=7 Card=1 Bytes=148)
    2 1 TABLE ACCESS (BY INDEX ROWID) OF 'TABLEA' (Cost=4 Card=1 Bytes=100)
    3 2 INDEX (RANGE SCAN) OF 'TABLEA_IDX_2' (NON-UNIQUE) (Cost=3 Card=1)
    4 1 INDEX (FAST FULL SCAN) OF 'TABLEB_IDX_003' (NON-UNIQUE)
    (Cost=2 Card=135 Bytes=6480)
    Statistics
    0 recursive calls
    18 db block gets
    15558 consistent gets
    47 physical reads
    9896 redo size
    423 bytes sent via SQL*Net to client
    1095 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    55 rows processed
    I have the same query but instead running using bind variable (I test it with both oracle form and SQL*plus), it takes considerably longer with a different execution plan:-
    Execution Plan
    0 INSERT STATEMENT Optimizer=CHOOSE (Cost=407 Card=1 Bytes=148)
    1 0 TABLE ACCESS (BY INDEX ROWID) OF 'TABLEA' (Cost=3 Card=1 Bytes=100)
    2 1 NESTED LOOPS (Cost=407 Card=1 Bytes=148)
    3 2 INDEX (FAST FULL SCAN) OF TABLEB_IDX_003' (NON-UNIQUE) (Cost=2 Card=135 Bytes=6480)
    4 2 INDEX (RANGE SCAN) OF 'TABLEA_IDX_2' (NON-UNIQUE) (Cost=2 Card=1)
    Statistics
    0 recursive calls
    12 db block gets
    3003199 consistent gets
    54 physical reads
    9448 redo size
    423 bytes sent via SQL*Net to client
    1258 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    55 rows processed
    TABLEA has around 3million record while TABLEB has 300 records. Is there anyway I can improve the speed of the sql query with bind variable? I have DBA Access to the database
    Regards
    Ivan

    Many thanks for your reply.
    I have run the statistic already for the both tableA and tableB as well all the indexes associated with both table (using dbms_stats, I am on 9i db ) but not the indexed columns.
    for table I use:-
    begin
    dbms_stats.gather_table_stats(ownname=> 'IVAN', tabname=> 'TABLEA', partname=> NULL);
    end;
    for index I use:-
    begin
    dbms_stats.gather_index_stats(ownname=> 'IVAN', indname=> 'TABLEB_IDX_003', partname=> NULL);
    end;
    Is it possible to show me a sample of how to collect statisc for INDEX columns stats?
    regards
    Ivan

  • Query with tables VEPVG, VBAK, VBAP AND KONV

    hi all,
    I have a requirement, that is Open Sale Orders which is having Special Discount. I am trying to write a Query, But KONV table is not coming into the joins. my execution plans is bellow
    VEPVG  -->  VBAK         vbak-knumv = konv-knumv and konv-kschl = Special Discount
                        VBAP
    Please explain me, how to design the query with conditions.
    Thanks & Regards,
    Srinivas

    Hi,
    Have you referred this help document.
    http://help.sap.com/printdocu/core/Print46c/EN/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    Regards - Shree

Maybe you are looking for

  • No sound from some audio tracks ... help!

    I am using GB 08 to add music to a movie for a friend's memorial. ( A keynote presentation exported as a QT movie)The Movie itself has no audio, I want to use a variety of songs that blend into each other. I'm used to doing this with Final Cut, but d

  • My serial number for my PS elements 7 isn't working?

    I have had it for a really long time now. It had it on my old desktop and my old laptop but those both broke a while back. I figured out how to install it to my new computer but it keeps telling me that my serial number is wrong, any ideas?

  • Resizing using Export not getting me to the size I need

    I need to resize a jpg from my iPhoto library to 180x200 pixels. I have followed the forums suggestions, but can't get to this size ratio. Can this be done with iPhoto 6. Many Thanks, flygirl10

  • 2008 2.8 Oct-core ATi 4870 & 10.5.7 display issues

    Anyone else with a 2008 Mac Pro and the new ATi 4870 graphics card? Waited forever for the card, then had to wait another week for 10.5.7. It works, but I get occasional, repeatable glitches on images in Aperture - while cropping images for example.

  • Aperture Library and Retrospect Backups

    I am a new Aperture user and I'm wondering if any other Aperture users have successfully come up with a Retrospect selector that will NOT include the Aperture library when performing a backup. I have tried several different versions, to no avail. Run