Complex Queries with Discoverer 3.1

I have ran a query with some filtered data. With the results of my original query, I need to exclude any duplicates from a matching field in a new worksheet with new conditions in a new query. Can this be done? I have tried using the subquery, but I am not looking for a calculation result or value, like your video store sample. Basically, any Customer ID in the original query that is = to my new set of ID's in my new query need to be excluded in the resulting set.

go in admin make a new folder with a complete quey with this subselect
where < 1 = ( select column from table
where column ( you want to have distinct ) = table.column)

Similar Messages

  • Complex Queries Developed in Desktop for Plus Users

    I develop complex queries in Discoverer desktop, with complex calculations and conditions and customized report formats. I understand that my "Plus" users can run them all. Is that correct?
    What about my "Viewer" users?

    Hi,
    The "Viewers" users can run any complex report, equally like "Plus". The reports would have to be shared with the Viewers users.
    Discoverer desktop is a client side development tool and Plus is the "Equivalent" web version. So complex calculations/conditions should not affect.
    Thanks.

  • Create a VC Model for BEx queries with Cell Editor

    Hello All,
    I am trying to create a VC Model for BEx queries with Cell Editor.
    BW Development Team has created a BEX query with complex restrictions and calculations using Cell Editor feature of BI-BEX.
    The query output in BEx analyzer is correct where all values are being calculated at each Cell level and being displayed.
    But, while creating VC model, system is not displaying the Cells.Thus, no VC Model can be created.
    I have executed below steps:
    1. Created a VC Model for BEx Query - ZQRY_XYZ
    2. Create Iview -> Create a dataService -> Provide a Table from the Output
    In the Column field system is not showing any of the Cells (present in Cell Editor)
    Please help me to solve this issue.
    Thanks,
    Siva

    Hi
    If 'Cell Editor' is been used then that query must have the structure in it. You have to select that 'structure' object in your 'VC Table'.
    If you select that then you will get the required result in the output. This structure will be the structure where 'cell reference' is used in BI query, You have to select that structures name.
    Regards
    Sandeep

  • OBIEE generates complex queries

    Hi,
    Currently we are experiencing performance issues, i.e. some queries are running for a very long time. I examined these queries and it struck me that it could be caused by the complexity of the generated queries. For example, a query accessing only one facttable accessed that facttable 5 times (the queries are concatenated through the WITH statement) ! I wonder, why is this necessary? Business Objects XI does not generate such complex queries, BO XI would access that facttable only one time.
    Basically my question is: which settings affect the queries generated by OBIEE? Isn't it possible to generate different, simpler queries?
    TIA,
    EriK

    Thanks guys. Bad design could be a reason.. but we're using Oracle's own product called BI-APPS and I expect that to be perfect...:-)
    Here is an example of a query that is imho way too complex:
    WITH
    SAWITH0 AS (select sum(T258218.LINE_AMT * T258218.GLOBAL1_EXCHANGE_RATE) as c1,
    T551303.PROJECT_NUMBER as c2,
    T258218.PURCH_ORDER_NUM as c3
    from
    W_PROJECT_D T551303 /* Dim_W_PROJECT_D_Project */ ,
    W_PURCH_COST_F T258218 /* Fact_W_PURCH_COST_F */
    where ( T258218.DELETE_FLG = 'N' and T258218.PROJECT_WID = T551303.ROW_WID and T551303.PROJECT_NUMBER = '101491' )
    group by T258218.PURCH_ORDER_NUM, T551303.PROJECT_NUMBER),
    SAWITH1 AS (select distinct SAWITH0.c2 as c1,
    SAWITH0.c3 as c2,
    SAWITH0.c1 as c3,
    SAWITH0.c1 as c4,
    SAWITH0.c1 as c5
    from
    SAWITH0),
    SAWITH2 AS (select distinct SAWITH1.c1 as c1,
    SAWITH1.c2 as c2,
    SAWITH1.c3 as c3
    from
    SAWITH1),
    SAWITH3 AS (select sum(T258218.LINE_AMT * T258218.GLOBAL1_EXCHANGE_RATE) as c1,
    T551303.PROJECT_NUMBER as c2,
    T258218.PURCH_ORDER_NUM as c3
    from
    W_PROJECT_D T551303 /* Dim_W_PROJECT_D_Project */ ,
    W_PURCH_COST_F T258218 /* Fact_W_PURCH_COST_F */
    where ( T258218.DELETE_FLG = 'N' and T258218.PROJECT_WID = T551303.ROW_WID and T551303.PROJECT_NUMBER = '101491' )
    group by T258218.PURCH_ORDER_NUM, T551303.PROJECT_NUMBER),
    SAWITH4 AS (select distinct SAWITH3.c2 as c1,
    SAWITH3.c3 as c2,
    SAWITH3.c1 as c3,
    SAWITH3.c1 as c4,
    SAWITH3.c1 as c5
    from
    SAWITH3),
    SAWITH5 AS (select sum(SAWITH4.c4) as c4,
    SAWITH4.c1 as c5
    from
    SAWITH4
    group by SAWITH4.c1),
    SAWITH6 AS (select sum(T258218.LINE_AMT * T258218.GLOBAL1_EXCHANGE_RATE) as c1,
    T551303.PROJECT_NUMBER as c2,
    T258218.PURCH_ORDER_NUM as c3
    from
    W_PROJECT_D T551303 /* Dim_W_PROJECT_D_Project */ ,
    W_PURCH_COST_F T258218 /* Fact_W_PURCH_COST_F */
    where ( T258218.DELETE_FLG = 'N' and T258218.PROJECT_WID = T551303.ROW_WID and T551303.PROJECT_NUMBER = '101491' )
    group by T258218.PURCH_ORDER_NUM, T551303.PROJECT_NUMBER),
    SAWITH7 AS (select distinct SAWITH6.c2 as c1,
    SAWITH6.c3 as c2,
    SAWITH6.c1 as c3,
    SAWITH6.c1 as c4,
    SAWITH6.c1 as c5
    from
    SAWITH6),
    SAWITH8 AS (select sum(SAWITH7.c5) as c3
    from
    SAWITH7)
    select SAWITH2.c1 as c1,
    SAWITH2.c2 as c2,
    SAWITH2.c3 as c3,
    SAWITH5.c4 as c4,
    SAWITH8.c3 as c5
    from
    SAWITH2,
    SAWITH5,
    SAWITH8
    where ( nvl(SAWITH2.c1 , 'q') = nvl(SAWITH5.c5 , 'q') and nvl(SAWITH2.c1 , 'z') = nvl(SAWITH5.c5 , 'z') )
    Basically the query is:
    select sum(T258218.LINE_AMT * T258218.GLOBAL1_EXCHANGE_RATE) as c1,
    T551303.PROJECT_NUMBER as c2,
    T258218.PURCH_ORDER_NUM as c3
    from
    W_PROJECT_D T551303 /* Dim_W_PROJECT_D_Project */ ,
    W_PURCH_COST_F T258218 /* Fact_W_PURCH_COST_F */
    where ( T258218.DELETE_FLG = 'N' and T258218.PROJECT_WID = T551303.ROW_WID and T551303.PROJECT_NUMBER = '101491' )
    group by T258218.PURCH_ORDER_NUM, T551303.PROJECT_NUMBER
    but this query is repeated multiple times. It looks like a self join - but why is OBIEE generating such a complex query? And can it be affected?
    Edited by: user10984315 on 18-Mar-2011 08:29
    Edited by: user10984315 on 18-Mar-2011 08:30

  • Please some one can explain about some complex queries

    BW Guru's,
    please some one can explain about some complex queries which was created while working on Reporting.
    I need to create profit and loss query as per requirment on the FL-Gl cube.
    Answer would be appreciate in advance.
    Regards
    Krish

    HI Aryan,
    No need to create FM on your own. You can copy the FM from Function Group RSAX.
    The procedure to create FM extractor is as follows:
    1) Create an extract structure.
    2) Go to SE80. Select Function Group RSAX , right click and then copy.
    3) Give your own name to the function group to copy.
    4) Select one appropriate FM from the list of FMs provided. eg FM RSAX_BIW_GET_DATA_SIMPLE.
    5)Specify the name of new FM you want to create.
    6) Go to SE37 and open the FM you have created by copying from Function Group RSAX.
    7) no need to change the import tab.
    8) On tables tab, for paramerter name E_T_DATA under asociate name specify the name of extract structure you hav created.
    9) Under source code tab make the changes in the source code only to customise it to your requirement. eg: declare the database table you are using, make changes where datasource is in picture, etc.
    I have created a generic DataSource with the help of above procedure.. I hope you will find it helpful...
    Regards,
    Geetanjali

  • REF partitioning is affecting on complex queries

    Hi,
    I am having 7 tables consider A,B,C,D,E,F,G. whereas A is master table and others are dependent on table A. columnA is referential key for all tables. Table A is having one DateRange column.
    I have successfully created range partitioning with partitioning key is DateRange. and Refeernce partitioning on other tables with column referring to ColumnA with foreign key.
    Also created local indexes on partitioned key DateRange.
    Problem is that, while fetching complex queries for reports, it is taking more time as compared to non partitioning structure. Is ref partitioning affecting on complex queries, queries returning more rows ??? Please suggest me about it.
    Thanks,
    Avinash.

    Did I miss anything ?Depends on what you've read about it sofar and why you decided to implement it.
    http://www.oracle-base.com/articles/11g/partitioning-enhancements-11gr1.php#reference_partitioning
    "The following conditions and restrictions apply to reference partitioning:
    The child table must specify a referential integrity constraint defined on the table being created. This constraint must be in ENABLE VALIDATE NOT DEFERRABLE state (the default) and refer to a primary or unique key on the parent table.
    The foreign key columns referenced in constraint must be NOT NULL.
    The constraint cannot use the ON DELETE SET NULL clause.
    The parent table referenced must be an existing partitioned table. All partitioning methods except interval partitioning are supported.
    The foreign key cannot contain any virtual columns.
    The referenced primary key or unique constraint on the parent table cannot contain any virtual columns.
    Reference partitioning cannot be used for index-organized tables, external tables, or domain index storage tables.
    A chain of reference partitioned tables can be created, but constraint used can't be self-referencing.
    The ROW MOVEMENT setting for both tables must match.
    Reference partitioning cannot be specified in a CREATE TABLE ... AS SELECT statement."

  • Differentiate between Simple, Medium and Complex Queries.

    Hi Gurus,
    I am a Tech. Architect on this new project. I would like to know how to differentiate between Simple, Medium and Complex Queries in BW because I need this info to work on the Estimates. Has this differentiation got anything to do with the Backend config also?
    Thanks in Advance.
    Chandu.

    Hi
    You need to understand the requirements and consider the following before you classify........
    1) Queries that are based on multiple key figures--which may result in cell definition.
    2) Queries with complex calculations.
    3) Queries that are based on Variable Exits
    Regards
    Srinivas Bandi

  • IMPLEMENTING PAGEWISE CONCEPT FOR COMPLEX QUERIES FOR WEB BASED TECHNOLOGIES

    Dear Friends
    how do i implement Page Wise concept for complex queries. Complex queries includes 'Group by', 'from selects'. Mere Rownum selection doesnt solve my problem. I have 3 buttons 'Previous', 'Next' and 'display of No. of records' . Kindly suggest me with a solution.

    The only widespread way is dynamically bild a SQL clause then parse and execute it using dynamic sql (package dbms_sql) or native dynamic sql (execute immediate clause).
    You can go through your already built cursor and display only those records you need (for example from 10th to 20th). I think there is no way to leave cursor open and reuse it another time. Every time You hit next, back or count button you need build new cursor (either selecting context columns to show some records or selecting count(*) to show number of records). You can generate this code with Oracle Designer, making webserver modules. Of course this will cost rather many $$$. Another tip - Designer makes this code for all situations and therefore it is somewhat difficult to understand it in the beginning. If you really need some example I can send something to you.

  • Documenting complex queries

    I'd like to start providing better documentation along with the database objects I produce. What's the best way to document what's going on in complex queries? I've started trying out different techniques of documenting source/target in a spreadsheet, but it seems to be lacking. I was wondering what others do? Any suggestions or references you could point me to? I could probably improve upon my inline comment practices, so any suggestions there are also welcome. Thanks

    I’ve encountered the problem before and got some good advice here: Re: Documentation help:  Procedural logic Vs Set logic
    Because SQL is an explicit language, and programmers being in the mental state that they are when programming, it’s difficult for us to deconstruct our perfectly explicit, self-documenting SQL statement into something that someone else will understand.
    The diagram linked in the above forum thread is an example where to explain what I’m doing, I’ve had to change the set-based logic of the SQL statement into a procedural loop type explanation. I hated doing this, but it was the best way I could think of to explain it to someone.
    More recently I’ve had to document a query that is fairly simple logically (to me anyway) but due to the number of tables and the fact that the audience doesn’t necessarily understand spatial queries, I found it easier to break it down using the following diagram:
    http://img.photobucket.com/albums/v115/whitehat/work%20related/query1.jpg
    tables probably won’t mean anything to you, but you can see how I’ve broken it down into business-logic “Retrieve criteria for exception checking”, “select providers”, “restrict providers” etc. the arrows represent the join criteria and the boxes split up the driving tables and the restriction tables.
    I’ve found this particular diagram very useful as part of the current project that I’m involved with. Even the System Testers are relying on this diagram to direct them in how everything fits together.
    Each situation is different however and you’ll just have to experiment with each bit of code as it comes along.
    Hope this helps!

  • Want complex queries

    Hi,
    Where can i find the SQL queries(unsolved) through which i can learn to write complex queries...
    As I am a novice programmer it would be better if the range varies from easy to complex ones.
    Thanks in advance.
    Mythili

    Actually for me a skill full SQL developer is one who can solve a complex problem with a simple SQL. Not the one who can write complex SQL ;)
    Some of the places from where i learn new and exiting stuff ever day are
    [Asktom.oracl.com |http://asktom.oracle.com/pls/asktom/f?p=100:1:146758316283624]
    [forums.oracle.com|http://forums.oracle.com/forums/main.jspa?categoryID=84]
    [Richard footes oracle blog|http://richardfoote.wordpress.com/]
    [Oracle Document is always there|http://tahiti.oracle.com/]
    These places are not going to make you a great SQL Developer in a day. You have to be there and keep learning constantly. Without your knowledge over a period of time your approach towards SQL will change. And change is good ;)

  • More complex queries ???

    hi all,
    Can you tell me anyone, where can I found more complex queries for oracle sql expert exam ?
    thx in advance

    Hi Christopher,
    have you checked out chapter 20 of the BPEL developers guide, at otn.oracle.com/bpel?
    It covers the dbadapter. Also we have many samples with the install, check out samples/tutorials/122.DBAdapter/PureSQLSelect.
    The most advanced solution, if you know TopLink well enough, is to use descriptor ammendment to express any complex sql using TopLink's proprietary expression API. Your ammendment class is written in java and must be on the appserver's classpath. You could check out the toplink otn forum for more info about that.
    Thanks
    Steve

  • Complex Queries.

    Hi Gang,
    I was in an interview last week and was asked to give an example of a complex queries I have worked with. I was really cought off guard and could not give a very intelligent answer other than mumbling. Can someone please help me out with real life examples? May be I will be asked the same in my next interview.
    Thanks,
    Kara.

    There are many features available in BEx querying, I would think that being able to discuss how / why you used some of them in the same query is what they are looking for, e.g. 
    - Creating RKFs with restrictions on several characteristics
    - Using variable offsetsto get KFs form different time periods
    - A case where using Constant Selection was needed.
    - Using some of the various totaling options.
    - Use of MultiProvider that includes Cube, ODS, and Master Data.
    Now if you haven't actually designed any quereis, this can be a challenge........

  • Queries with CTXRULE Index

    I am trying to build an alerting application when, on receipt of a new XML document, user's are alerted if the document matches one or more of the profiles that they have defined. I have created a CTXRULE index that does this but only with very simple profiles. For example ABOUT(soccer), which is the example in the Text documentation.
    Is it possible to create more complex queries, for example using WITHIN to only match within defined elements of the XML document. Are there any good example?
    Thanks
    Martin Haigh

    Please ask questions on Oracle Text (formerly InterMedia text) in the Oracle Text forum, you will get a quicker, more expert answer there.

  • Complex queries in Open SQL

    Moved to performance forum by moderator
    Hi Experts,
    This is more of a discussion rather than a question. I would like to know the advantages of Open SQL. It prevents you from writing complex queries, the kind of queries that you can write in native sql.
    The biggest disadvantage I feel is that you have to fetch data into internal tables and loop. This takes a lot of processing time when you have a report having a lot of lines. A complex query using complex joins and subqueries will always perform better than having to loop and process data and simple things like generating sequence.
    The best thing about open sql is the way it handles select options.
    I would like to get your opinions and suggestions how to write complex queries in ABAP with some code snippets if possible.
    Warm Regards,
    Abdullah
    Edited by: Matt on Jan 21, 2009 6:54 PM

    > select - endselect will query the database repeatedly and wont be any different from using a loop on
    > internal table.
    that is a  very common misunderstanding, but not true, it uses the arry interface, but gives you the possibility to react on every line. But interaction with DB is in blocks.
    The biggest advantage of Open SQL is the implementation of the table buffer, every Open SQL Statement checks the buffers first.
    Other advantage, all statements changing table definitions are not allowed.
    And of course, as already said, it is a set of commands available on all DB platforms certified for SAP software, i.e. IBM, Oracle, Max DB and Microsoft.
    Complex queries, even with the available joins you can write very very complex queries ... sometimes too complex. I see not advantage for a competetion of writing the most complex statement
    Siegfried

  • How to querie with bind variable in findMode?

    Hallo,
    is it possible to use a querie with bind variable in findMode? And when how is it possible to initialize the bind variable?
    Any help is appreciated.

    Hi,
    bind variables can be linked from teh ADF binding to e.g. a managed bean, the sessionScope or other binding attributes via EL. So when you go into findMode and execute the query, the EL will grab the bindVariable values automatically.
    Frank

Maybe you are looking for

  • Load data from infocube to DP planning area

    Hi All, I have loaded the data from info cube to DP planning area keyfigures with the transaction /SAPAPO/TSCUBE. the data copy was successful and there were no error messages. However, the keyfigure values in planning book are shown exactly as doubl

  • RSREGEN is not available in the System NSP

    Hello @ all, I like to compile all SAP Standard ABAPs. In older releases I could do this with the ABAP RSREGEN, but in the MINISAP (NSP) this ABAP is not included. Does anybody know, if I can do the compiling also in the NSP-System and how??? Thanks

  • Replace 'raise' with message

    Hello! Replace 'raise' with message is the warning which I get. What has to be done ? Regards sas   CALL FUNCTION '/BMW/STD_IFF_SNR_ZU_AG'        EXPORTING             werk       = iff_daten-werk             sachnummer = iff_daten-sachnummer         

  • Unable to update credit card info.

    Got a mail about wrong card info.. so Im trying to update it to my new card but doesnt seem to work it says invaild? need some help.. thanks

  • My ipad 2 has frozen with the apple logo showing

    my ipad has frozen & i dont know how to restore it