Result from 2 queries input to 3rd query

Hi,
We have requriement as follows, not sure how to go about this.
We Need to build a workbook with 3 sheets wth 3 different queries. Once the workbook is open, we need to take documents numbers from query 1 and query 2 and input to variable of query 3 and execute query 3.
Please help me understand how i can build this.
Thanks
AP

You can try for APD option..
.or else you can use some permuations on Replacement path variable..it will be able to solve your issue.
another option is writing a Customer exit variable with manual entry enabled..here also you will have to load Report 1 and 2 data to some infoprovider.
Regards,
RK

Similar Messages

  • WHERE using results from another querie

    Hi,
    Example:
    <cfquery name="QUERY 1" datasource="MyDatabase">
    SELECT Table1ID, A, B, C
    FROM Table1
    WHERE A = #Form.A#
    <cfoutput query="QUERY1">#A#<br></cfoutput>
    It returns:
    3
    4
    <cfquery name="QUERY 2" datasource="MyDatabase">
    SELECT Table2ID, A, Z, Y
    FROM Table2
    WHERE A IN (3,4)
    <cfoutput query="QUERY
    2">#Table2ID#</br></cfoutput>
    It returns:
    a
    b
    c
    d
    e
    f
    But if I make QUERY2 as:
    <cfquery name="QUERY 2" datasource="MyDatabase">
    SELECT Table2ID, A, Z, Y
    FROM Table2
    WHERE A IN (#QUERY1.A#)
    it returns only:
    a
    b
    c
    The values a,b,c are the Table2ID's where A=3
    The values d,e,f are the Table2ID'a where A=4
    How can I make return all values?
    Hope you understand.
    Thanks
    Manel

    Think about what you are doing for a second. You are
    selecting multiple rows of data with your first query. Then you are
    using a cfloop to loop through each row returned from that first
    query to perform another query that uses the value returned in the
    A column. The problem is that you are executing your second query
    once for each row returned by your first query, and you really
    aren't saving that result anywhere, since each iteration of the
    loop causes your cfselect to overwrite your previous results. You
    can create a list variable and populate it with the results from
    your first query, but I have to ask, unless you need the results
    from your first query for something else, why don't you just join
    the two tables and use on equery?
    Based on what you have, something like this?
    <cfquery name="QUERY 2" datasource="MyDatabase">
    SELECT T2.ID, T2.A, T2.Z, T2.Y
    FROM Table2 T2
    INNER JOIN Table1 T1 ON T2.A = T1.A
    WHERE T1.A = #Form.A#
    </cfquery>
    Phil

  • Sum calculated data results from three queries in another query

    Hello,
      I would like to read calculated data from three different queries and sum them in another query.  Is it possible to do it, please?

    Hi there,
    We have done this in Excel with a debtors report. I have five queries, each on a different sheet in a workbook. I have their total line appearing at the top of the results area.
    Then I have an Excel worksheet with Excel formulas to bring through the totals on the other reports.
    i.e.   +Sheet1!C30      + Sheet2!C35     + Sheet3!D40    = Result
    Hope this helps,
    Regards
    Gill

  • Strange result from insert into...select query

    Hello guys,
    I need your preciuos help for a question maybe simple, but that I can't explain by myself!
    I have a query of "insert into...select" that, as I have explained in the title, returns a strange result. In facts, If I execute ONLY the SELECT statement the query returns the expected result (so 2 rows); instead If I execute the entire statement, that is the "insert into...select", the query returns 0 rows inserted!!
    Following an example of the query:
    INSERT
    INTO TITOLI_ORI
    COD_TITOLO_RICCONS ,
    D_ESTRAZIONE ,
    COD_SOCIETA ,
    COD_PIANO_CONTABILE ,
    COD_CONTO_CONTABILE ,
    COD_RUBRICATO_STATISTICO_1 ,
    COD_NDG ,
    NUM_ESEGUITO ,
    CUR_IMPORTO_RICCONS ,
    CUR_IMPORTO_BICO ,
    FLG_MODIFICATO ,
    CUR_NON_ASSEGNATO ,
    FLG_QUOTATO ,
    COD_CATEG ,
    TIP_COPERTURA ,
    TIPTAS_TITOLO
    SELECT NEWID,
    '28-feb-2111',
    COD_SOCIETA,
    COD_PIANO_CONTABILE,
    COD_CONTO_CONTABILE,
    COD_RUBRICATO_STATISTICO_1,
    COD_NDG,
    NUM_ESEGUITO,
    CUR_VAL_IMPEGNI,
    'ABC' as CUR_IMPORTO_BICO,
    0 as FLG_MODIFICATO,
    NULL as CUR_NON_ASSEGNATO,
    FLG_QUOTATO,
    COD_CATEG,
    TIP_COPERTURA,
    TIP_TASSO
    FROM
    (SELECT S.COD_SOC AS COD_SOCIETA,
    S.TIP_PIANO_CNTB AS COD_PIANO_CONTABILE,
    S.COD_CONTO_CNTB AS COD_CONTO_CONTABILE,
    S.COD_RUBR_STAT AS COD_RUBRICATO_STATISTICO_1,
    TRC.COD_RAGGR_IAS AS COD_RAGGRUPPAMENTO_IAS,
    TRC.COD_NDG AS COD_NDG,
    TRC.COD_ESEG AS NUM_ESEGUITO,
    CAST((TRC.IMP_PLUS_MINUS_VAL/TRC.IMP_CAMB) AS FLOAT) AS CUR_VAL_IMPEGNI,
    TRC.TIP_QUOTAZ AS FLG_QUOTATO,
    TRC.COD_CAT_TIT AS COD_CATEG,
    TIP_COP AS TIP_COPERTURA,
    T.TIP_TASSO AS TIP_TASSO
    FROM S_SLD_CNTB S
    INNER JOIN
    (SELECT DISTINCT COD_SOC,
    TIP_PIANO_CNTB,
    COD_CONTO_CNTB,
    COD_RUBR_STAT ,
    COD_INTER_TIT AS COD_INTER
    FROM S_COLLEG_CONTO_CNTB_TIT
    WHERE COD_SOC = 'ME'
    ) CCC
    ON S.COD_SOC = CCC.COD_SOC
    AND S.TIP_PIANO_CNTB = CCC.TIP_PIANO_CNTB
    AND S.COD_CONTO_CNTB = CCC.COD_CONTO_CNTB
    AND S.COD_RUBR_STAT = CCC.COD_RUBR_STAT
    INNER JOIN S_TIT_RICCONS TRC
    ON CCC.COD_INTER = TRC.COD_INTER_TIT
    AND CCC.COD_SOC = TRC.COD_SOC
    AND TRC.COD_RAGGR_IAS = RTRIM('VALUE1 ')
    AND TRC.COD_RAGGR_IAS NOT IN ('VALUE2')
    AND TRC.DES_TIP_SLD_TIT_RICCONS IN ('VALUE3')
    AND TRC.DES_MOV_TIT = RTRIM('VALUE4 ')
    AND TRC.COD_CAT_TIT = RTRIM('VALUE4 ')
    AND TRC.COD_INTER_TIT = RTRIM('VALUE5')
    AND '28-feb-2011' = TRC.DAT_RIF
    LEFT JOIN S_TIT T
    ON T.COD_INTER_TIT = TRC.COD_INTER_TIT
    AND T.COD_SOC = TRC.COD_SOC
    AND '28-feb-2011' = T.DAT_RIF
    INNER JOIN S_ANAG_SOGG AG
    ON TRC.COD_NDG = AG.COD_NDG
    AND AG.COD_SOC = TRC.COD_SOC
    AND '28-feb-2011' = AG.DAT_RIF
    WHERE S.DAT_RIF = '28-feb-2011'
    AND (S.FLG_ANULL_BICO = 0
    OR S.FLG_ANULL_BICO IS NULL)
    AND S.COD_SOC = 'V6'
    AND LENGTH(RTRIM(S.COD_CONTO_CNTB)) = 10
    AND S.TIP_PIANO_CNTB = 'V7'
    AND TRC.IMP_PLUS_MINUS_VAL < 0
    AND SUBSTR(S.COD_CONTO_CNTB,1,7) IN (RTRIM('VALUE8 '))
    Thanks a lot

    Right, I have executed this steps:
    - I have changed the query with the select count(*)
    - Changed the insert into with the select count(*)
    - Executed the insert into
    These are the result:
    SQL> select count(*) from TITOLI_ORI2;
    COUNT(*)
    1
    BUT:
    SQL> select * from TITOLI_ORI2;
    A
    0
    The insert into that I've modified is this:
    INSERT INTO bsc.TITOLI_ORI2
    select count(*)
    FROM
    (SELECT bsc.NEWID,
    TO_DATE('28-feb-2111','DD-MON-YYYY') as data,
    COD_SOCIETA,
    COD_PIANO_CONTABILE,
    COD_CONTO_CONTABILE,
    COD_RUBRICATO_STATISTICO_1,
    COD_NDG,
    NUM_ESEGUITO,
    CUR_VAL_IMPEGNI,
    'ABC' AS CUR_IMPORTO_BICO,
    0 AS FLG_MODIFICATO,
    NULL CUR_NON_ASSEGNATO,
    FLG_QUOTATO,
    COD_CATEG,
    TIP_COPERTURA,
    TIP_TASSO
    FROM
    (SELECT S.COD_SOC AS COD_SOCIETA,
    S.TIP_PIANO_CNTB AS COD_PIANO_CONTABILE,
    S.COD_CONTO_CNTB AS COD_CONTO_CONTABILE,
    S.COD_RUBR_STAT AS COD_RUBRICATO_STATISTICO_1,
    TRC.COD_RAGGR_IAS AS COD_RAGGRUPPAMENTO_IAS,
    TRC.COD_NDG AS COD_NDG,
    TRC.COD_ESEG AS NUM_ESEGUITO,
    CAST((TRC.IMP_PLUS_MINUS_VAL/TRC.IMP_CAMB) AS FLOAT) AS CUR_VAL_IMPEGNI,
    TRC.TIP_QUOTAZ AS FLG_QUOTATO,
    TRC.COD_CAT_TIT AS COD_CATEG,
    TIP_COP AS TIP_COPERTURA,
    T.TIP_TASSO AS TIP_TASSO
    FROM bsc.S_SLD_CNTB S
    INNER JOIN
    (SELECT DISTINCT COD_SOC,
    TIP_PIANO_CNTB,
    COD_CONTO_CNTB,
    COD_RUBR_STAT ,
    COD_INTER_TIT AS COD_INTER
    FROM bsc.S_COLLEG_CONTO_CNTB_TIT
    WHERE COD_SOC = 'ME'
    ) CCC
    ON S.COD_SOC = CCC.COD_SOC
    AND S.TIP_PIANO_CNTB = CCC.TIP_PIANO_CNTB
    AND S.COD_CONTO_CNTB = CCC.COD_CONTO_CNTB
    AND S.COD_RUBR_STAT = CCC.COD_RUBR_STAT
    INNER JOIN bsc.S_TIT_RICCONS TRC
    ON CCC.COD_INTER = TRC.COD_INTER_TIT
    AND CCC.COD_SOC = TRC.COD_SOC
    AND TRC.COD_RAGGR_IAS = RTRIM('HFT ')
    AND TRC.COD_RAGGR_IAS NOT IN ('GPO')
    AND TRC.DES_TIP_SLD_TIT_RICCONS IN ('DISPONIBILI')
    AND TRC.DES_MOV_TIT = RTRIM('CONSEGNARE ')
    AND TRC.COD_CAT_TIT = RTRIM('OBBLIGAZIONE ')
    AND TRC.COD_INTER_TIT = RTRIM('334058')
    AND '28-feb-2011' = TRC.DAT_RIF
    LEFT JOIN bsc.S_TIT T
    ON T.COD_INTER_TIT = TRC.COD_INTER_TIT
    AND T.COD_SOC = TRC.COD_SOC
    AND '28-feb-2011' = T.DAT_RIF
    INNER JOIN bsc.S_ANAG_SOGG AG
    ON TRC.COD_NDG = AG.COD_NDG
    AND AG.COD_SOC = TRC.COD_SOC
    AND '28-feb-2011' = AG.DAT_RIF
    WHERE S.DAT_RIF = '28-feb-2011'
    AND (S.FLG_ANULL_BICO = 0
    OR S.FLG_ANULL_BICO IS NULL)
    AND S.COD_SOC = 'ME'
    AND LENGTH(RTRIM(S.COD_CONTO_CNTB)) = 10
    AND S.TIP_PIANO_CNTB = 'IS'
    AND TRC.IMP_PLUS_MINUS_VAL < 0
    AND SUBSTR(S.COD_CONTO_CNTB,1,7) IN (RTRIM('P044C11 '))
    Another time the strange result returns!!
    And I've created the table TITOLI_ORI2 as create table TITOLI_ORI2 (a number); to contain the number result of the query.

  • Calculate a result from a variable input

    Hello,
    I want to get a particular value for a characteristic when I run the query. I have a query that will return actual results for the month/year (MTD) that the user enters at the beginning. It will also show actual results for two months prior to the current month, budgeted values for current month, actual values for the year, budgeted values for the current year.
    I want to calculate the number of patients from an invoice for the current month (MTD), and for all the other fields mentioned above. I want to restrict them to a particular code and their recipient ID. Do I have to write a customer exit and then include it in a formula variable? I’ve don’t have much experience in doing this. Any help would be greatly appreciated.
              Jul 2006     Aug 2006  Sept 2006  Sept 2006 Bud  YTD 2006 Act  YTD 2006 Bud
    of patients
        Code A
        Code B
        Code C
    I’m using a multiprovider and one of the cubes included is the Invoice cube.
    Thanks
    Sam

    You could do this sort of thing:
    REPORT znrw_calculator               MESSAGE-ID z1.
    PARAMETERS: p_code1(20) LOWER CASE.
    DATA t_source_tab(72) OCCURS 0 WITH HEADER LINE.
    DATA g_program_name LIKE sy-repid.
    DATA g_syntax_message(128).
    DATA g_line_no TYPE i.
    DATA var TYPE p.
    AT SELECTION-SCREEN.
      PERFORM check_dynamic_abap.
    START-OF-SELECTION.
      PERFORM do_the_business IN PROGRAM (g_program_name) CHANGING var .
      WRITE:/ p_code1 NO-GAP,'=' NO-GAP,var.
    *&      Form  CHECK_DYNAMIC_ABAP
    FORM check_dynamic_abap.
      DATA  t_abap(80) OCCURS 0 WITH HEADER LINE.
    *set up a dynamic program
      REFRESH t_source_tab.
      APPEND 'REPORT'                            TO t_source_tab.
      APPEND sy-repid                            TO t_source_tab.
      APPEND '.'                                 TO t_source_tab.
      APPEND 'FORM do_the_business changing var type p.'   TO t_source_tab.
      APPEND 'var =' TO t_source_tab.
      append p_code1 to t_source_tab.
      APPEND '.' TO t_source_tab.
      APPEND 'ENDFORM.'                          TO t_source_tab.
    *Generate the dynamic program so that the form can be used subsequently.
      GENERATE SUBROUTINE POOL t_source_tab NAME g_program_name
               MESSAGE g_syntax_message LINE g_line_no.
      IF sy-subrc <> 0.
        MESSAGE e999 WITH g_syntax_message.
      ENDIF.
    ENDFORM.                         . "CHECK_DYNAMIC_ABAP

  • 0PA_C01  different results from two queries on the same cube ....

    HI
    Can you please help with this  problems ...
    i am running a two queries with the same restrictions e.g
    Sep 08 for employee 22345 ,
    In one report it shows the Pay Scale level as A1 , then in the other report it shows Pay scale Scale level as A2  ,
    looking  at the master data in 0employee  , the first report is right ... this is how the data looks like in 0employee
    Employee  Valid from      To                Pay scale Level
    222345       2007-11-03   2008-09-30     A1
    222345       2008-10-01   9999-12-31     A2
    Can someone please shed some light on this , im thinking it has something to do with update rule but even that is supposed to use last date of the month , not 1st day of the following month. The Cube is a stndard cube 0PA_C01 and the update rule aswell .....

    Hi,
    Please check in the cube whether the data for the Employee is getting with two values like shown in your question:
    Employee Valid from To Pay scale Level
    222345 2007-11-03 2008-09-30 A1
    222345 2008-10-01 9999-12-31 A2
    and also check whether when the data loaded to the cube.
    There may be some change in the report structure where the difference is getting may in the column wise or row wise restriction may present.
    Please check on the structure of the report also.
    With Regards,
    Ravi Kanth

  • Results from conditions not passed to Jump query

    Dear all,
    I have created a summary query and I have a condition applied on it. The condition is 'KF' < 4. I get the results of the query. I have changed the Calculate Result As to 'Total' to show the total of only the records that are displayed.
    However I have a jump query on it and when I goto the Jump query, it shows all the records though they dont satisfy the conditions. I want the drill down report to show the results of only those values displayed in the Summary report.
    Is there a setting where I can change to get the required result.
    Any helpful reply would be awarded.
    thanks,
    KK

    Hey Roberto,
    Thank you for the reply. Yes I would also need to have the same condition in the reciever query. However, my condition is on result values in the reciever query. To explain u clearly...
    I have the data as below in my cube
    Material   QTY
    123     10
    124     20
    125     30
    126     40
    I have a summary query for which I want a condition where QTY < 40
    When I enter Material 123;124;125;126 I get the result as below
    Material   QTY
    123     10
    124     20
    125     30
    When I drill down I get the below result
    123     1     2
    123     2     4
    123     3     4
    <b>Result          10</b>
    124     1     5
    124     2     10
    124     3     5
    <b>Result          20</b>
    125     1     10
    125     2     10
    125     3     10
    <b>Result          30</b>
    126     1     10
    126     2     20
    126     3     10
    <b>Result          40</b>
    I cannot apply the same condition in the reciever query because I want the condition to be applied on the result rows. I have created one more formula KF with SUMCT(QTY) and applied condition on that but it still doesnt work.
    Any suggestions would be highly appreciated.
    thanks,
    KK

  • How to processing the results from the select statement in SQL query?

    Hi
    This might be too simple, but my knowledge of the SQL is very limited...
    I have table where I do have details from calls (Lync QoE).
    I can take all calls from the table, but I would like to count the concurrent calls on the table. This is how I got it work on the Excel to work (but I would like to do that on the SQL statement to get it more dynamic use):
    Table have these line and this is what I get out from the Select):
    [callid],[start],[end]
    1ABC,1.1.2014 01:00:15, 1.1.2014 01:01:00
    5DEF,1.1.2014 01:00:45, 1.1.2014 01:05:00
    FDE2,1.1.2014 01:03:15, 1.1.2014 01:04:00
    KDJ8,1.1.2014 01:04:15, 1.1.2014 01:06:00
    FDJ8,2.1.2014 01:04:15, 2.1.2014 01:06:00
    KDSE,3.1.2014 01:04:15, 3.1.2014 01:06:00
    The information I would like to get, is what is the maximum amount of the concurrent calls per day.
    On the excel I basically count line by line how many concurrent calls each line have had, and then pickup the highest one. On above example the calls 5DEF, FDE2 and FDE2 have been active at the same time which gives 3 for the first day.
    The table is ordered by the start. So let say the code is on the third line (FDE2). I need to count calls from before which end time is after the start time (of FDE2), but also I need to count calls after (FDE2) which are started before the current
    call has ended.
    Petri

    Unfortunately your post is off topic as it's not specific to SQL Server Samples and Community Projects.  
    This is a standard response I’ve written in advance to help the many people who post their question in this forum in error, but please don’t ignore it.  The links I provide below will help you determine the right forum to ask your question in.
    For technical issues with Microsoft products that you would run into as an end user, please visit the Microsoft Answers forum ( http://answers.microsoft.com ) which has sections for Windows, Hotmail,
    Office, IE, and other products.
    For Technical issues with Microsoft products that you might have as an IT professional (like technical installation issues, or other IT issues), please head to the TechNet Discussion forums at http://social.technet.microsoft.com/forums/en-us, and
    search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), please head to the MSDN discussion forums at http://social.msdn.microsoft.com/forums/en-us, and
    search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here: http://community.dynamics.com/
    If you think your issue is related to SQL Server Samples and Community Projects and I've flagged it as Off-topic, I apologise.  Please repost your question and include as much detail as possible about your problem so that someone can assist you further. 
    If you really have no idea where to post your question please visit the Where is the forum for…? forum http://social.msdn.microsoft.com/forums/en-us/whatforum/
    When you see answers and helpful posts, please click Vote As Helpful,
    Propose As Answer, and/or Mark As Answer
    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCSD, MCSA, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    Twitter: @Mr_Wharty
    MC ID:
    Microsoft Transcript

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • Last Result from Fulltext SQL Query Search Not Showing

    I am creating a custom search results page for MOSS 2007 (using inline .aspx code - don't ask) that uses Fulltext SQL Queries.  I get the results in a ResultTable (see code below) and then use a DataTable to write code to display it (I could have used
    a DataGrid, I know).
    The problem is that the last result is not showing. So, if it reports that there are 5 results, only 4 will show. I have verified that all 5 results do exist (using a slightly broadened query). If it reports 1 result, none exist in the DataTable that loads
    the result data from the ResultTable.
    FullTextSqlQuery query = new FullTextSqlQuery(site);
    query.ResultTypes = ResultType.RelevantResults;
    query.QueryText = qry;
    query.RowLimit = 50;
    query.StartRow = iPage;
    try
    ResultTableCollection results = query.Execute();
    ResultTable resultTable = results[ResultType.RelevantResults];
    DataTable table = new DataTable();
    table.Load(resultTable, LoadOption.OverwriteChanges);
    int n = resultTable.TotalRows;
    The variable "qry" is a valid SQL Query with the relevant clauses.
    I am using a foreach loop to go through "table" (a DataTable), and so I do not think that I have a "one-off error".
    Any suggestions would be most welcome.

    So in results you have all items but when you are loading it into table (type DataTable) you are loosing one last record.
    1) First you check what data you are getting in resultTable - as you are specifying RelevantResult
    2) Check last index of data in ResultTable collection and try to find out the last index ResultTable, or try to find last index of data in result table
    DataTable.Load method accepts parm of type IDataReader and IDatareader, there are cases it looses records if not read properly..check below links
    http://stackoverflow.com/questions/8396656/why-does-my-idatareader-lose-a-row
    http://msdn.microsoft.com/en-us/library/system.data.datatable.load(v=vs.110).aspx
    <hr> Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL <br/> <b><a href="http://insqlserver.com">Everything about SQL Server | Experience inside SQL Server </a></b>-<a href="http://insqlserver.com">Mohammad
    Nizamuddin </a>

  • Is it possible to put the results from a query in a variable to use in the bean class?

    Hello, I'm using JDeveloper 12.1.2.0.0
    I would like to keep the result of my queries (the method i created in the AppModule) in a RichTable or other type of variable so i can have the results stored and i don't have to do unnecessary queries after. I don't think the query is the problem but keeping the results.
    I've tried to do that by using this:
        public String testVFactSales(String conditions) {
            PreparedStatement query = getDBTransaction().createPreparedStatement("" + "select * from v_fact_sales " + conditions, 0);
            //ResultSet rs;
            ResultSet result;
            //RichTable result;
            //String result = null;
            try {
                //query.setString(1, conditions);
                // query.execute();
                query.execute();
                result = query.getGeneratedKeys();
                query.close();
                System.out.println("Result: " + result.toString());
                return result.toString();
            } catch (SQLException e) {
                e.printStackTrace();
            return "";
    As you can see, i've already tried some solutions but so far i only get errors (cannot convert or null exception, when i try to put the result in a richtable in my bean class)
    Any ideas?
    This is very important for me, since it would improve the performance of my project a lot.
    Regards,
    Frederico.

    Hey Arunkumar,
    I came to this conclusion since i'm using binding variables with my where clauses.
    I've measured the time and i get really bad time responses.
    This is my main table query, where all the others selections will be filter the search in this table:
    SELECT VFactSalesNew.N_SALES,                              
           VFactSalesNew.QUANTITY,                              
           VFactSalesNew.PRICE,                               ,                              
           VFactSalesNew.FK_STORE,                              
           VFactSalesNew.ID_ANO,                              
           VFactSalesNew.QUARTER   
    FROM V_FACT_SALES_NEW VFactSalesNew                              
    WHERE                                          
    ((nvl(:var_dimCoin,'0') ='0' OR FK_COIN IN (select * from THE(select cast( in_list(:var_dimCoin) as mytableType ) from dual ) a) )                                                   
    AND                                                 
    (nvl(:var_dimProduct,'0') ='0' OR FK_PRODUCT IN (select * from THE(select cast( in_list(:var_dimProduct) as mytableType ) from dual ) a) )                                                  
    AND                                                 
    (nvl(:var_dimCustomer,'0') ='0' OR FK_CUSTOMER IN (select * from THE(select cast( in_list(:var_dimCustomer) as mytableType ) from dual ) a) )                                                 
    AND                                                 
    (nvl(:var_dimStore,'0') ='0' OR FK_STORE IN (select * from THE(select cast( in_list(:var_dimStore) as mytableType ) from dual ) a) )                                                
    AND                                                 
    (nvl(:var_dimSeller,'0') ='0' OR FK_SELLER IN (select * from THE(select cast( in_list(:var_dimSeller) as mytableType ) from dual ) a) )                                                  
    AND                                                 
    (nvl(:var_dimProject,'0') ='0' OR FK_PROJECT IN (select * from THE(select cast( in_list(:var_dimProject) as mytableType ) from dual ) a) )                                                  
    AND                                                 
    (nvl(:var_ano, '0') ='0' OR ID_ANO IN (select * from THE(select cast( in_list(:var_ano) as mytableType ) from dual ) a) )                                                  
    AND                                                 
    (nvl(:var_treemap,'0') ='0' OR PK_REGION IN (select * from THE(select cast( in_list(:var_treemap) as mytableType ) from dual ) a) )                                                  

  • Query Builder problem - query results from previous query

    Hi.
    I have a 100% repeatable problem in Oracle Query Builder (Version 6.0.7.1.0) where some rows from the results of a previous query appear in the results for the current query. The queries being run are saved in *.brw files. If I close down Query Builder completely between queries, there is no problem. If I run one query, export the results to a CSV file, close that query and then open a second query, when I run the second query there are rows in the results that shouldn't be there (they are remnants of the first query). Interestingly the total number of rows for the second query is correct, so the same number of rows are missing as shouldn't be there. Anyone come across this before? Problem is repeatable for different database users and on different computers.
    regards,
    Martin

    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.

  • Can we use Result from another query in Webi using Bex uery universe?

    Hi,
    Can we use Result from another query filter option in Webi to create a report using a Bex Query universe?
    I need to create a report using two universes, one is Bex Query Universe and the other is Orcle universe. I have two queries, one is using Oracle universe; the other using Bex Query universe. I need to pass the Oracle data from the Oracle query to the Bex Query query to get the matched data from SAP Bex query.
    I used Result from another query in the query filter panel for the query using Bex query universe. But I got an error saying that 'A filter contains a wrong value. you cannot run this query. (Error: WIS 00007). The data used in the filter on both sides are the same. they are char.
    I have tested by using two queries from the same Bex query universe to see if the Result from another query filter option works. And I got the same error.
    Has anyone run into the same issue and if this is possible and what should be the solution?
    Thanks in advance!
    Edited by: BO_Haiyan on Oct 6, 2010 3:47 PM

    In that situation:
    Create two queries : Oracle and BW query.
    @ Report:
    As you have to see result set from both the Dataproviders, correct? To achieve thise one must have common dimension objects to merge them at report and use Objects those are coming from both queries to use them in single Table/Report.
    Unless you don't use Merge Dimensions, you don't get a chane to use both queries objects in single Table/Report. (It will give tooltip saying: You can't drop here -- Incompatable Objects)
    In case, if you don't have common dimensions, change object definitions to Detail objects, for those required.
    Hope it helps you.
    Thank You!!

  • Transformation not working on result  from oraext:query-database() functio

    Step 1: Create a project in Jdeveloper (File->New->Project->SOA Project)
    Step 2: Select synchronous process
    Step 3: Take the default schema for input and output
    Step 4: create a schema to hold multiple simple type string values.
    Step 5: Import that xsd file in the project wsdl file.
    Step6: Create a another variable (var1) referring the above element type (result)
    Step7: Drop an assign activity from component palette to the process between Receive and Replay activity
    Step 8: In the from section use the function oraext:query-database("select ename from emp",true(),true(),'jdbc/EBS_database').in the to section select the var1 variable.
    Step9: Drop another assign activity from component palette to the process before Replay activity and after the first assign activity
    Step 10: In from section select the first ename using xpath from var variable and assign to the output variable.
    Error: The value is not coming to the output from source(var) variable using xpath or transformation.

    See the audit trail on EM and verify why it is not working.
    Regards,
    Anuj

  • Query on results from another query

    Post Author: Duncan1980
    CA Forum: Crystal Reports
    Is it possible to query on the results from another query.  I have a query that produces a list of document numbers.  I want to use the output from that query as the filter criteria in a another query in the same Universe. 
    The output from the first query can be as much as 2000, so it would be very time consuming to cut and paste these into a filter.
    Both reports are built, but can not figure out how to link the first report output to the filtering criteria on the second report.  I
    I am using business objects XI release 2 web intelligence 11.5.3.417 enterprise.

    Hi Vivek,
    It was not directly solved but I applied alternate logic to over come the issue.
    Here's what I did to overcome:
    I used a sub query in place of the whole result from another query.
    For Ex:
    Dim1 inlist result from another query1
    I made it as
    Dim1 inlist (Dim0)
    where Conditions.
    Here Dim0 is the object which we use for Result from another query and Conditions will be the necessary filter conditions to arrive proper Dim0.  Make sure proper context is formed for the sub query.
    Even though it resolved my problem, It introduces an new issue. It causes increase in query run time when huge set of data is returned from sub query.
    Please let me know if i haven't explained clearly.
    Hi Aris_BO,
    Sorry for not responding earlier.  The logic would probably make more queries null & not null. Thats why I was not advised to use it.
    Thanks
    LN

Maybe you are looking for

  • Afs sales order

    Hi all, can someone give some explanation about the differences between a normal sale order in sd and a sales order in sd afs? Do you have some documentations? thanks in advance

  • MacBook Air fails to wake and reboots instead after upgrading to Mavericks

    Hi, I've got a MacBook Air, 2011, 13', that has been working fine for a few years already. I upgraded to Mavericks two days ago and so far it has been working great except for one irritating issue - it keeps rebooting my system instead of waking up t

  • Unusual Audio Streaming Problem

    I have Comcast cable, Linksys cable modem and Airport Extreme router. I monitor a web site that offers a live audio feed which I am unable to receive via cable UNLESS I run ethernet directly from the modem to my computer. HOWEVER, I can get the feed

  • Connect iMac to an HDTV??

    Hi, Does anyone know if an HDTV will work when hooked up to the new iMac? I can't seem to find anything on the topic. I have a Toshiba 30HF85 TV with HDMI and I have a DVI-to-HDMI cable. I'll obviously need to get the mini-dvi adapter. I'm going to o

  • How Direct Import .AVI file in to Final Cut Pro 6

    How can i Direct import .AVI Files in to Final Cut Pro 6.. Please Tell me Any kind of plugin or application or codec..... thankyou very much