IN A NATURAL JOIN THE ANSWER QUERY DEPENDS OF PROJECTION ??!!

Hi,
Related to this question
Link: problems with natural join
Does the answer query depend of projection in a complex NATURAL JOIN query?
Thanks,
Ion

You are most likely encountering this bug:
Bug 5031632 - Wrong results from NATURAL JOIN, Metalink Note: 5031632.8
It currently affects all versions of Oracle.
You can tell something weird is going on by the EXPLAIN PLAN results:
Query:
SELECT     *
FROM     BOOK
NATURAL JOIN
     AUTHORSHIP
     NATURAL JOIN
          AUTHOR
          NATURAL JOIN
          COUNTRY
WHERE     COUNTRY.NAMECOUNTRY = 'Canada'
Explain Plan:
SQL> /
PLAN_TABLE_OUTPUT
Plan hash value: 3878360587
| Id  | Operation        | Name | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT |      |     1 |    39 |    28   (8)| 00:00:01 |
|*  1 |  HASH JOIN       |      |     1 |    39 |    28   (8)| 00:00:01 |
|*  2 |   HASH JOIN      |      |     1 |    29 |    17   (6)| 00:00:01 |
|*  3 |    HASH JOIN     |      |     1 |    23 |     9  (12)| 00:00:01 |
|   4 |     VIEW         |      |     2 |    16 |     2   (0)| 00:00:01 |
|   5 |      UNION-ALL   |      |       |       |            |          |
|   6 |       FAST DUAL  |      |     1 |       |     2   (0)| 00:00:01 |
|*  7 |       FILTER     |      |       |       |            |          |
|   8 |        FAST DUAL |      |     1 |       |     2   (0)| 00:00:01 |
|   9 |     VIEW         |      |     3 |    45 |     6   (0)| 00:00:01 |
|  10 |      UNION-ALL   |      |       |       |            |          |
|  11 |       FAST DUAL  |      |     1 |       |     2   (0)| 00:00:01 |
|  12 |       FAST DUAL  |      |     1 |       |     2   (0)| 00:00:01 |
|  13 |       FAST DUAL  |      |     1 |       |     2   (0)| 00:00:01 |
|  14 |    VIEW          |      |     4 |    24 |     8   (0)| 00:00:01 |
|  15 |     UNION-ALL    |      |       |       |            |          |
|  16 |      FAST DUAL   |      |     1 |       |     2   (0)| 00:00:01 |
|  17 |      FAST DUAL   |      |     1 |       |     2   (0)| 00:00:01 |
|  18 |      FAST DUAL   |      |     1 |       |     2   (0)| 00:00:01 |
|  19 |      FAST DUAL   |      |     1 |       |     2   (0)| 00:00:01 |
|  20 |   VIEW           |      |     5 |    50 |    10   (0)| 00:00:01 |
|  21 |    UNION-ALL     |      |       |       |            |          |
|  22 |     FAST DUAL    |      |     1 |       |     2   (0)| 00:00:01 |
|  23 |     FAST DUAL    |      |     1 |       |     2   (0)| 00:00:01 |
|  24 |     FAST DUAL    |      |     1 |       |     2   (0)| 00:00:01 |
|  25 |     FAST DUAL    |      |     1 |       |     2   (0)| 00:00:01 |
|  26 |     FAST DUAL    |      |     1 |       |     2   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - access("BOOK"."IDBOOK"="AUTHORSHIP"."IDBOOK")
   2 - access("AUTHORSHIP"."IDAUTHOR"="AUTHOR"."IDAUTHOR")
   3 - access("AUTHOR"."IDCOUNTRY"="COUNTRY"."IDCOUNTRY")
   7 - filter(NULL IS NOT NULL)
Query:
SELECT     NAMEBOOK
FROM     BOOK
NATURAL JOIN
     AUTHORSHIP
     NATURAL JOIN
          AUTHOR
          NATURAL JOIN
          COUNTRY
WHERE     COUNTRY.NAMECOUNTRY = 'Canada'
Explain Plan:
SQL> /
PLAN_TABLE_OUTPUT
Plan hash value: 3246924444
| Id  | Operation             | Name | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT      |      |     1 |    24 |    27   (4)| 00:00:01 |
|*  1 |  HASH JOIN            |      |     1 |    24 |    27   (4)| 00:00:01 |
|   2 |   MERGE JOIN CARTESIAN|      |     1 |    21 |    19   (6)| 00:00:01 |
|*  3 |    HASH JOIN          |      |     1 |    11 |     9  (12)| 00:00:01 |
|   4 |     VIEW              |      |     2 |    16 |     2   (0)| 00:00:01 |
|   5 |      UNION-ALL        |      |       |       |            |          |
|   6 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|*  7 |       FILTER          |      |       |       |            |          |
|   8 |        FAST DUAL      |      |     1 |       |     2   (0)| 00:00:01 |
|   9 |     VIEW              |      |     3 |     9 |     6   (0)| 00:00:01 |
|  10 |      UNION-ALL        |      |       |       |            |          |
|  11 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|  12 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|  13 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|  14 |    BUFFER SORT        |      |     5 |    50 |    19   (6)| 00:00:01 |
|  15 |     VIEW              |      |     5 |    50 |    10   (0)| 00:00:01 |
|  16 |      UNION-ALL        |      |       |       |            |          |
|  17 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|  18 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|  19 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|  20 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|  21 |       FAST DUAL       |      |     1 |       |     2   (0)| 00:00:01 |
|  22 |   VIEW                |      |     4 |    12 |     8   (0)| 00:00:01 |
|  23 |    UNION-ALL          |      |       |       |            |          |
|  24 |     FAST DUAL         |      |     1 |       |     2   (0)| 00:00:01 |
|  25 |     FAST DUAL         |      |     1 |       |     2   (0)| 00:00:01 |
|  26 |     FAST DUAL         |      |     1 |       |     2   (0)| 00:00:01 |
|  27 |     FAST DUAL         |      |     1 |       |     2   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - access("BOOK"."IDBOOK"="AUTHORSHIP"."IDBOOK")
   3 - access("AUTHOR"."IDCOUNTRY"="COUNTRY"."IDCOUNTRY")
   7 - filter(NULL IS NOT NULL)
41 rows selected.There are two major differences in these plans.
1. The correct result has HASH JOINS. However the incorrect result has a MERGE JOIN CARTESIAN. A cartesian join should not be here as there is no need for one per the table structure and NATURAL JOIN syntax.
2. There is a filter condition missing in the predicate information session.
Both #1 and #2 above point to the bug I identified. The current work around us to use the JOIN ... ON syntax.
HTH!

Similar Messages

  • To join the sql query

    Hi All
    Following query is to monitor users tablespace and temp tablesapce. How do I can join these two query as a single query. Kindly assist.
    Users tablespace mon:
    ==============
    select TT.tablespace_name,
    round(TOTAL) TOTAL,
    round(FREE) FREE,
    round(TOTAL - FREE) USED,
    round(100*(TOTAL - FREE)/TOTAL) PCT_USED
    from
    (select tablespace_name, sum(bytes)/1024/1024 FREE
    from dba_free_space group by tablespace_name) FR,
    (select tablespace_name, sum(bytes)/1024/1024 TOTAL
    from dba_data_files group by tablespace_name) TT
    where TT.tablespace_name = FR.tablespace_name(+);
    Temp tablespace mon:
    ===============
    select TT.tablespace_name,
    round(TOTAL) TOTAL,
    round(FREE) FREE,
    round(TOTAL - FREE) USED,
    round(100*(TOTAL - FREE)/TOTAL) PCT_USED
    from
    (select tablespace_name, sum(bytes_free)/1024/1024 FREE
    from v$temp_space_header group by tablespace_name) FR,
    (select tablespace_name, sum(bytes)/1024/1024 TOTAL
    from dba_temp_files group by tablespace_name) TT
    where TT.tablespace_name = FR.tablespace_name(+);

    select TT.tablespace_name,
    round(TOTAL) TOTAL,
    round(FREE) FREE,
    round(TOTAL - FREE) USED,
    round(100*(TOTAL - FREE)/TOTAL) PCT_USED
    from
    (select tablespace_name, sum(bytes)/1024/1024 FREE
    from dba_free_space group by tablespace_name) FR,
    (select tablespace_name, sum(bytes)/1024/1024 TOTAL
    from dba_data_files group by tablespace_name) TT
    where TT.tablespace_name = FR.tablespace_name(+)
    UNION
    select TT.tablespace_name,
    round(TOTAL) TOTAL,
    round(FREE) FREE,
    round(TOTAL - FREE) USED,
    round(100*(TOTAL - FREE)/TOTAL) PCT_USED
    from
    (select tablespace_name, sum(bytes_free)/1024/1024 FREE
    from v$temp_space_header group by tablespace_name) FR,
    (select tablespace_name, sum(bytes)/1024/1024 TOTAL
    from dba_temp_files group by tablespace_name) TT
    where TT.tablespace_name = FR.tablespace_name(+);

  • How join the two query block with same field

    sorry sir i am posting dublicate thread
    i thought you not understand my question
    sir i have two query block in report with same field
    i try the link object but that creat now block not creat link withen query block
    please give me idea
    thank

    Dear,
    Use data link object.
    Click at data link object then click on the fild in query block1 and drag it into the other query block data link will be created.
    try it

  • Query based on "NATURAL JOIN" statement of Oracle9i

    I have created following 4 tables
    create table CUST_MASTER
    (CUST_NO NUMBER(3),CUST_NAME VARCHAR2(20),CUST_CITY VARCHAR2(20));
    create table ITEM_MASTER
    (ITEM_NO NUMBER(2),ITEM_NAME VARCHAR2(20),
    PRICE NUMBER(4));
    create table ORDER_HEADER
    ( ORDER_NO NUMBER(4), CUST_NO NUMBER(3));
    create table ORDER_ITEMS
    ( ORDER_NO NUMBER(4), ITEM_NO NUMBER(2), QTY NUMBER(3));
    Based on the above 4 table I have executed the following query.
    select c.cust_no, c.cust_name, c.cust_city, oh.order_no, i.item_no, i.item_name, i.price, oi.qty
    from cust_master c, item_master i, order_header oh, order_items oi
    where c.cust_no = oh.cust_no and oh.order_no = oi.order_no and oi.item_no = i.item_no;
    How should I build similar query in Oracle9i making use of "NATURAL JOIN" statement?

    Hallo,
    yes you are correct.
    From SQL Reference
    NATURAL JOIN The NATURAL keyword indicates that a natural join is being performed. A natural join is based on all columns in the two tables that have the same name. It selects rows from the two tables that have equal values in the relevant columns
    Nothing about foreign keys.
    Test:
    select * from scott.emp natural join scott.dept
        DEPTNO      EMPNO ENAME      JOB               MGR HIREDATE                  SAL       COMM DNAME          LOC         
            20           7369     SMITH          CLERK                7902     17.12.1980            800                    RESEARCH           DALLAS
            30           7499     ALLEN          SALESMAN             7698     20.02.1981           1600            300     SALES              CHICAGO
            30           7521     WARD           SALESMAN             7698     22.02.1981           1250            500     SALES              CHICAGO
            20           7566     JONES          MANAGER              7839     02.04.1981           2975                    RESEARCH           DALLAS
            30           7654     MARTIN         SALESMAN             7698     28.09.1981           1250           1400     SALES              CHICAGO
            30           7698     BLAKE          MANAGER              7839     01.05.1981           2850                    SALES              CHICAGO
            10           7782     CLARK          MANAGER              7839     09.06.1981           2450                    ACCOUNTING         NEW YORK
            20           7788     SCOTT          ANALYST              7566     19.04.1987           3000                    RESEARCH           DALLAS
            10           7839     KING           PRESIDENT                     17.11.1981           5000                    ACCOUNTING         NEW YORK
            30           7844     TURNER         SALESMAN             7698     08.09.1981           1500              0     SALES              CHICAGO
            20           7876     ADAMS          CLERK                7788     23.05.1987           1100                    RESEARCH           DALLAS
            30           7900     JAMES          CLERK                7698     03.12.1981            950                    SALES              CHICAGO
            20           7902     FORD           ANALYST              7566     03.12.1981           3000                    RESEARCH           DALLAS
            10           7934     MILLER         CLERK                7782     23.01.1982           1300                    ACCOUNTING         NEW YORK
    alter table scott.emp drop constraint fk_deptno
    select * from scott.emp natural join scott.dept
        DEPTNO      EMPNO ENAME      JOB               MGR HIREDATE                  SAL       COMM DNAME          LOC         
            20           7369     SMITH          CLERK                7902     17.12.1980            800                    RESEARCH           DALLAS
            30           7499     ALLEN          SALESMAN             7698     20.02.1981           1600            300     SALES              CHICAGO
            30           7521     WARD           SALESMAN             7698     22.02.1981           1250            500     SALES              CHICAGO
            20           7566     JONES          MANAGER              7839     02.04.1981           2975                    RESEARCH           DALLAS
            30           7654     MARTIN         SALESMAN             7698     28.09.1981           1250           1400     SALES              CHICAGO
            30           7698     BLAKE          MANAGER              7839     01.05.1981           2850                    SALES              CHICAGO
            10           7782     CLARK          MANAGER              7839     09.06.1981           2450                    ACCOUNTING         NEW YORK
            20           7788     SCOTT          ANALYST              7566     19.04.1987           3000                    RESEARCH           DALLAS
            10           7839     KING           PRESIDENT                     17.11.1981           5000                    ACCOUNTING         NEW YORK
            30           7844     TURNER         SALESMAN             7698     08.09.1981           1500              0     SALES              CHICAGO
            20           7876     ADAMS          CLERK                7788     23.05.1987           1100                    RESEARCH           DALLAS
            30           7900     JAMES          CLERK                7698     03.12.1981            950                    SALES              CHICAGO
            20           7902     FORD           ANALYST              7566     03.12.1981           3000                    RESEARCH           DALLAS
            10           7934     MILLER         CLERK                7782     23.01.1982           1300                    ACCOUNTING         NEW YORK
    ALTER TABLE scott.emp
    ADD CONSTRAINT fk_deptno FOREIGN KEY (deptno)
    REFERENCES SCOTT.dept (deptno)
    ENABLE NOVALIDATE
    /Regards
    Dmytro Dekhtyaryuk

  • Addition of Filters on Answers changing the physical query

    Hello,
    I have three Dimensions D1, D2 and D3 joining (as left outer join in BM layer, i have a requirement where i have to show all the records from Dimension) to a common Fact 'F'
    I am trying to build a report based on columns from 3 dimensions.
    The report gives a correct output, and returns a single physical query.
    If i add a filter condition from say D1 on the report like D1.Col = <something> on the answers report, the physical
    query splits in two and then join the two query to give the result.
    Any thoughts what could have gone wrong here?
    Thank You

    hi..
    First tell me all dimensions are left outer with fact?
    Then, check your fact table LTS levels..
    If you have created hierarchies for dimensions, and all dimensions are directly connected to the facts... then, mention the levels for particular fact LTS to detail level for all dimensions. .
    Check this...

  • Natural join--not supported in this technology

    Technology on which natural join is executed doesnt support natural joins.
    the odi version i am usind is 11.1.1.
    Look Up also doesnt seem to work in odi 11.1.1.
    How to use look up in odi 11.1.1.

    HI,
    For lookup you can use Outer join.
    For insert you can use Suppose s1 is source and T1 is Target then you can do S1 left outer join with T1.
    Thanks,
    Lony

  • A curious "anomoly" with the NATURAL JOIN  compared to the JOIN USING

    The following query returns what I expect from the HR schema [106 rows]:
    select last_name, department_name from employees JOIN departments USING (department_id);
    However, when I do the full natural join with this, I only get 32 rows.
    select last_name, department_name from employees  NATURAL JOIN departments;
    Is the full NATURAL JOIN not using DEPARTMENT_ID to join on? But if not what else would it use? I just ran into this and am mostly curious as I do not use the natural join syntax in production but instead prefer the JOIN ON.
    Thanks.

    Just expanding on user2361373's point a bit, the EMPLOYEES and DEPARTMENTS table both have a DEPARTMENT_ID column and both have a MANAGER_ID column. So the natural join will join on both columns.
    This is why the natural join is evil and ought never, ever, ever, ever, ever to be used in real production code. It violates fundamental tenants of building maintainable applications because it creates the potential that adding columns to an existing table will cause existing code to return incorrect results. If you decide that you need to add a CREATE_DATE column to a few tables, for example, to track when a row was inserted, suddenly, all your natural joins may decide that they need to add the CREATE_DATE to the list of columns to join on and your app starts behaving incorrectly. Or your initial DEPARTMENTS table doesn't have a MANAGER_ID column and you decide to add that later on-- all the existing natural joins between EMPLOYEE and DEPARTMENT start returning incorrect results.
    Justin

  • Using join and batch reading in the same query

    Hi,
    I wonder if it is possible to use "Joining" and "batch reading" in the same query.
    For example I Have
    A -> 1-1 B
    A -> 1-1 B
    B -> 1-M C
    This is the case where I have two separate 1-1 relationships to the same class B from A. Toplink 10.0.3 can manage it nicely through joining.
    Now, I would like to read a set of As (with its 2 Bs) and all Cs for each B.
    It seems that the following configuration does not work:
    A -> 1-1 B (use joining)
    A -> 1-1 B (use joining)
    B -> 1-M C (Batch read)
    Any help would be greatly appreciated
    Tony.

    James,
    Would you be so kind to look at the following code?
    Am I formulating it correctly to achieve my desired behavior?
    Trip.class -> 1-1 PickupStop
    Trip.class -> 1-1 DropoffStop
    PickupStop and DropoffStop extend Stop and use same table (STOP)
    Stop -> 1-M StopEvents
    I would like to fetch all Trips, with their Stops and all StopEvents in 2 queries:
    1. Trip joined with Stop
    2. Batchread StopEvents
    Code:
    ReadAllQuery raq = new ReadAllQuery(Trip.class);
    Expression qexp1 = new ExpressionBuilder();
    Expression qexp2 = new ExpressionBuilder();
    raq.addJoinedAttribute("pickupStop");
    raq.addJoinedAttribute("dropoffStop");
    raq.addBatchReadAttribute(qexp1.get("pickupStop").get("vStopEvents"));
    raq.addBatchReadAttribute(qexp2.get("dropoffStop").get("vStopEvents"));

  • Can we implement the custom sql query in CR for joining the two tables

    Hi All,
    Is there anyway to implement the custom sql query in CR for joining the two tables?
    My requirement here is I need to write sql logics for joining the two tables...
    Thanks,
    Gana

    In the Database Expert, expand the Create New Connection folder and browse the subfolders to locate your data source.
    Log on to your data source if necessary.
    Under your data source, double-click the Add Command node.
    In the Add Command to Report dialog box, enter an appropriate query/command for the data source you have opened.
    For example:
    SELECT
        Customer.`Customer ID`,
        Customer.`Customer Name`,
        Customer.`Last Year's Sales`,
        Customer.`Region`,
        Customer.`Country`,
        Orders.`Order Amount`,
        Orders.`Customer ID`,
        Orders.`Order Date`
    FROM
        Customer Customer INNER JOIN Orders Orders ON
            Customer.`Customer ID` = Orders.`Customer ID`
    WHERE
        (Customer.`Country` = 'USA' OR
        Customer.`Country` = 'Canada') AND
        Customer.`Last Year's Sales` < 10000.
    ORDER BY
        Customer.`Country` ASC,
        Customer.`Region` ASC
    Note: The use of double or single quotes (and other SQL syntax) is determined by the database driver used by your report. You must, however, manually add the quotes and other elements of the syntax as you create the command.
    Optionally, you can create a parameter for your command by clicking Create and entering information in the Command Parameter dialog box.
    For more information about creating parameters, see To create a parameter for a command object.
    Click OK.
    You are returned to the Report Designer. In the Field Explorer, under Database Fields, a Command table appears listing the database fields you specified.
    Note:
    To construct the virtual table from your Command, the command must be executed once. If the command has parameters, you will be prompted to enter values for each one.
    By default, your command is called Command. You can change its alias by selecting it and pressing F2.

  • Cartesian join in the SQL query

    Hi,
    I have a problem when joining two tables that cannot join directly. As I read (please correct me if I'm wrong), two dims have to join by one fact in order to extract information from them. This way, I created logical source tables with SQL query that join both dims. So, if for example Dim A and Dim B cannot join directly, I created a "mapping table" which is a select that joins these 2 tables in the proper way and the fields are the row_wids from these tables. This way, I created the following model diagram for this relationship:
    DimActivity -< FactMapping >- DimPNR
    DimActivity -< FactActivity >- DimMapping
    DimPNR -< FactPNR >- DimMapping
    Now, I can extract information from both dims and their metrics, except in one case; If I extract info from ("Segment Designer") "Dim-Activity", "Dim-PNR", "Fact-Activity" and "Fact-PNR", I get a query that first calculates the metric from Activity, then calculates the metric from PNR, and when it joins both queries, I get cardinality because it doesn't join through the "mapping tables". The whole query is:
    WITH
    SAWITH0 AS (select sum(T690608."QTY") as c1,
    T690608."ASSET_NUM" as c2
    from "W_ASSET_D" T690608 /* Dim_W_ASSET_D */
    group by T690608."ASSET_NUM"),
    SAWITH1 AS (select sum(T682428."COST") as c1,
    T682428."STATUS_WID" as c2
    from "W_ACTIVITY_F" T682428 /* Dim_W_ACTIVITY_F */
    group by T682428."STATUS_WID")
    select distinct SAWITH0.c2 as c1,SAWITH1.c2 as c2,SAWITH1.c1 as c3,SAWITH0.c1 as c4
    from
    SAWITH0,SAWITH1
    Why there is no condition joining SAWITH0 and SAWITH1? Is there a way to force this to be an inner join? I'm looking forward to your answer, since this problem is urgent within this project. Thank you in advance

    Ok.
    I assume that you have for one activity several asset PNR and for one asset several activity.
    The factPNR is on this way a real bridge table. It's a way to be able to design a many-to-many relationship.
    Have a look here for more detail on how to build a many-to-many relationship :
    http://gerardnico.com/wiki/dw/data_quality/relationships#many-to-many
    Therefore I assume that you want this design :
    DimActivity -< FactActivity >- < FactPNR >- DimPNR  and you will have :
    DimActivity -< FactActivity >- < BridgeTable >- DimPNR  How to build your bridge table ?
    In the physical layer, :
    * create a new table BridgeActivityPNR, open it and select "statement"
    * enter your sql statement
    SELECT DISTINCT A.ROW_WID ACTIVIDAD_WID, B.ROW_WID ASSET_WID
    FROM W_ACTIVITY_F A,
    W_ASSET_D B,
    W_SRVREQ_D C,
    X_S_CMPT_MTRC_F D,
    X_S_ASSET_FEA_D E
    WHERE A.X_SRA_SR_ID=C.INTEGRATION_ID AND
    C.X_VLG_FLIGHT_ID=D.X_ROW_ID AND
    D.X_ROW_ID=E.X_CM_ID AND
    E.X_ASSET_ID=B.X_ROW_ID* add two columns in the column tab : ACTIVIDAD_WID and ASSET_WID
    * create the physical join with the table FactActivity and DimPNR
    * drag and drop in the business model your table BridgeActivityPNR
    * in the BMM, create the complex join like this :
    DimActivity -< FactActivity >- < BridgeTable >- DimPNR  * open your logical bridge table and check the bridge table option.
    And you are done if I didn't forget anything.
    A complete example here :
    http://gerardnico.com/wiki/dat/obiee/obiee_bridge_table

  • The order of joining the tables in a query ANSI92

    Hi all!
    I have three table in Univerce.
    I need that those tables joined in next order:
    tab1 inner join tab2 right join tab3
    When creating a report in WebI they are connected as (regardless of the order of dimentions):
    tab1 right join tab3 inner join tab2
    How to set the correct order of joining the tables?
    OR
    how to change RIGHT OUTER JOIN on LEFT OUTER JOIN ?
    P.S. I use BO XI3.1, which not have parameter OUTERJOINS_GENERATION
    Thanks!

    it depends on your source system
    for example if you are using oracle, you can edit the link between the table and add this
    (+)
    for example
    TAB1.ID = TAB2.ID (+)
    AND TAB1.DEPT  = TAB2.DEPT(+)
    See the following link for discussing outer and inner joins for oracle
    http://www.dba-oracle.com/t_outer_joins.htm
    good luck
    Amr

  • Write the following query using JOIN keyword ?

    Qest:
    Write the following query using JOIN keyword ?
    select ID_category from category_master X
    where Exist(select 1 from sub_category Y where
    X.ID_category=Y.ID_category)Edited by: 799660 on Oct 3, 2010 6:05 AM

    select  X.ID_category
      from  category_master X join (select distinct ID_category from sub_category) Y
             on (X.ID_category=Y.ID_category)
    /SY.

  • COPA extraction: RD155 No source could be found to answer the search query

    Hi Everyone,
    I'm trying to schedule an init. load for the new fiscal year from an Account-based 1_CO_PA** extractor. I've entered restrictions for Controlling Area (single entry) and Fiscal Period (PERIO) 001.2011 - 001.2025.
    When I try to schedule the init. load or even test the extraction in RSA3, I get the error message 'No source could be found to answer the search query'. I've checked my summarization levels and and they have the value '*' for all characteristics.
    If someone can provide an explanation for the error message, it would be most helpful.
    Thanks,
    Ram

    Hi Ram,
    This error is almost always caused by incomplete or incorrect customizing:
    In addition, the summarization level must have status 'ACTIVE' (this applies also to the search function in the maintenance transaction for CO-PA data sources,KEB0).                                                                               
    Please also review the SAP note 392635 which is release independent and has further information on the customizing and CO-PA extraction:                                                                               
    392635 - Information: Sources with BW extraction for account-based    
               CO-PA                                                        
    So please check your customizing and the note 392635 carefully in particular please pay attention to the following:                                                                               
    There has to be one (single)  summarization level that contains all characteristics (except for  the controlling area) with '*' in the   
    characteristics view in  transaction KEDV and has status 'active'.   
    After checking the above you need to replicate the datasource in the connected BW system and reactivate the transfer rules.               
    Best Regards,
    Des

  • Message no. RD155 -- No source could be found to answer the search query

    Hi All,
    while checking my new COPA datasource in RSA3, I get the Error message No source could be found to answer the search query Message no RD155.
    I have maintained the summarization levels which is in a status of "Active Without Data". Also note, the tables for CE1XXXX, CE2XXXX & CE3XXXX do not contain data. However, CE4XXXX table does contain data.
    Kindly help.... its very very important and i need to finish this datasource ASAP

    Hi
    I am unable to implement both the notes as I am already on a higher version of PI_BASIS.
    I have replicated my datasource into the BW system..
    While doing the INIT load without DATA TRANSFER, i do not get any error message, however, while doing a Delta it does not bring in any records but does not fail as well
    However, if i delete the initialization selections and load the data using the setting INITIALIZATION WITH DATA TRANSFER or Full UPDATE, the data load fails with the ERROR MESSAGE "Errors occurred in data selection."
    Please help... This issue is very very important and i need to deliver it ASAP
    Edited by: Sneha Santhanakrishnan on Jun 24, 2010 9:29 AM

  • Natural Join multiple tables bug!! SQLPLus 10.1.0.4.2

    SQLPLus 10.1.0.4.2 bug detected!! Who knows how to fix it? Many thanks
    I'm experimenting with natural join and found some really strange behaviour when I tried to combine multiple natural joins.
    I have the following schema:
    Model (ModelID PK, brand, type, year), 49 records
    Car (CarID PK, ModelID FK, OwnerID FK, price) 60 records
    Owner (OwnerID PK, name, adres) 48 records
    The database system is Oracle 10g 64bit on Windows 2003 64bit
    The following query gives me the result I expect (29 records):
    SELECT * FROM Owner NATURAL JOIN Car NATURAL JOIN Model
    WHERE brand='Volkswagen'
    However when I start specifying columns in the select clause the number of records in the result differs depending on the columns I select:
    SELECT OwnerID FROM Owner NATURAL JOIN Car NATURAL JOIN Model
    WHERE brand='Volkswagen'
    --> 1260 records
    SELECT OwnerID, CarID FROM Owner NATURAL JOIN Car NATURAL JOIN Model WHERE brand='Volkswagen'
    --> 1260 records
    SELECT ModelID FROM Owner NATURAL JOIN Car NATURAL JOIN Model
    WHERE brand='Volkswagen'
    --> 29 records (as expected).
    Would this be caused by a bug in Oracle or is there a logical explanation?
    TIA,
    Axel Hallez

    Duplicate thread:
    Natural Join bug!! Is this a sqlplus bug, how to fix it?

Maybe you are looking for

  • How to show a custom error message in Workflows

    Hi I am working on an already developed Z copy of BO FIPP. The requirement is to make a customer specific validation on Profit centers which should be checked just before posting the document. I am aware of the POST method in FIPP that uses Function

  • Issue in implementing Dynamic participant chooser process Step

    I am facing issue in implementing Participant chooser process Step. I want to create dynamic Participant chooser process Step, I have implemented 'ParticipantStepChooser' class and overwrote 'getParticipant' method. But this process did not appear in

  • Maximum lines set on Sales Order view

    Hi All, This is happening with all sales orders with more than 8 items, where the rest of the items are not seen in the sale order after creation and save. For example 15 different type of material were sold to customer, the billing document view (VF

  • Spotlight search doesn't work on Time Machine after Lion

    I've got a new (couple of months old) iMac that came with Snow Leopard.  Since updating to Lion however, I've been unable to search for any files on my Time Machine drive (external USB connected HDD). I've tried forcing Spotlight to re-index my exter

  • [CS3 JS] How to search for accented letters with GREP

    Hello, In the following script I have two words, each that has an accented letter. It appears that neither in the script nor in the Find and Replace dialog that GREP will recognize words with accents. It will replace accented characters however. I ca