Table order in join, how?

obiee generate sql like this
select ... from ( select ... from T1, T2) d1 left outer join (select ... from T1, T3 ) d2 on d1.c1 = d2.c1
in this case I need right outer join (becouse first select have less rows then second)
or change like this
select ... from ( select ... from T1, T3) d2 left outer join (select ... from T1, T2 ) d1 on d1.c1 = d2.c1
is it possible?
maybe in BMM or where else?

elunin!,
as per your subject line - "table order in join", I think specifying the driving table option looks pertinent. Thus in the bmm layer you have the option driving table, which might help.
J
-bifacts
http://www.obinotes.com

Similar Messages

  • How to adjust table order in OBIEE.

    now i design logic model in admin tool. tableA join tablleB (tableA.id = tableB.user_id)
    after i design it, i drop tableA.id, tableB.user_id) into answer. then i check sql log in analytics web applications.
    the sql is like below, my questions is if i want to adjust table order i how to implement it ? "from tableA, tablleB" to "from tablleB, tableA"
    select tableA.id , tableB.user_id
    from tableA, tablleB
    where tableA.id = tableB.user_id

    up....

  • 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

  • In pages, when a create a document, potions of it, say several pages will be clumped together and it effects me editing their order.  It is like they are forever joined- How do I edit my document and print just one page or move just one page?

    In pages, when a create a document, potions of it, say several pages will be clumped together and it effects me editing their order.  It is like they are forever joined- How do I edit my document and print just one page or move just one page?

    May you open your eyes before creating a new thread ?
    Your question was already asked and answered today.
    https://discussions.apple.com/thread/3177074?tstart=0
    Yvan KOENIG (VALLAURIS, France) jeudi 14 juillet 2011 14:40:40
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please :
    Search for questions similar to your own
    before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • In  a SQL query whihc has join, How to reduce Multiple instance of a table

    in a SQL query which has join, How to reduce Multiple instance of a table
    Here is an example: I am using Oracle 9i
    is there a way to reduce no.of Person instances from the following query? or can I optimize this query further?
    TABLES:
    mail_table
    mail_id, from_person_id, to_person_id, cc_person_id, subject, body
    person_table
    person_id, name, email
    QUERY:
    SELECT p_from.name from, p_to.name to, p_cc.name cc, subject
    FROM mail, person p_from, person p_to, person p_cc
    WHERE from_person_id = p_from.person_id
    AND to_person_id = p_to.person_id
    AND cc_person_id = p_cc.person_id
    Thnanks in advance,
    Babu.

    SQL> select * from mail;
            ID          F          T         CC
             1          1          2          3
    SQL> select * from person;
           PID NAME
             1 a
             2 b
             3 c
    --Query with only ne Instance of PERSON Table
    SQL> select m.id,max(decode(m.f,p.pid,p.name)) frm_name,
      2         max(decode(m.t,p.pid,p.name)) to_name,
      3         max(decode(m.cc,p.pid,p.name)) cc_name
      4  from mail m,person p
      5  where m.f = p.pid
      6  or m.t = p.pid
      7  or m.cc = p.pid
      8  group by m.id;
            ID FRM_NAME   TO_NAME    CC_NAME
             1 a          b          c
    --Expalin plan for "One instance" Query
    SQL> explain plan for
      2  select m.id,max(decode(m.f,p.pid,p.name)) frm_name,
      3         max(decode(m.t,p.pid,p.name)) to_name,
      4         max(decode(m.cc,p.pid,p.name)) cc_name
      5  from mail m,person p
      6  where m.f = p.pid
      7  or m.t = p.pid
      8  or m.cc = p.pid
      9  group by m.id;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 902563036
    | Id  | Operation           | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT    |        |     3 |   216 |     7  (15)| 00:00:01 |
    |   1 |  HASH GROUP BY      |        |     3 |   216 |     7  (15)| 00:00:01 |
    |   2 |   NESTED LOOPS      |        |     3 |   216 |     6   (0)| 00:00:01 |
    |   3 |    TABLE ACCESS FULL| MAIL   |     1 |    52 |     3   (0)| 00:00:01 |
    |*  4 |    TABLE ACCESS FULL| PERSON |     3 |    60 |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       4 - filter("M"."F"="P"."PID" OR "M"."T"="P"."PID" OR
                  "M"."CC"="P"."PID")
    Note
       - dynamic sampling used for this statement
    --Explain plan for "Normal" query
    SQL> explain plan for
      2  select m.id,pf.name fname,pt.name tname,pcc.name ccname
      3  from mail m,person pf,person pt,person pcc
      4  where m.f = pf.pid
      5  and m.t = pt.pid
      6  and m.cc = pcc.pid;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4145845855
    | Id  | Operation            | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |        |     1 |   112 |    14  (15)| 00:00:01 |
    |*  1 |  HASH JOIN           |        |     1 |   112 |    14  (15)| 00:00:01 |
    |*  2 |   HASH JOIN          |        |     1 |    92 |    10  (10)| 00:00:01 |
    |*  3 |    HASH JOIN         |        |     1 |    72 |     7  (15)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL| MAIL   |     1 |    52 |     3   (0)| 00:00:01 |
    |   5 |     TABLE ACCESS FULL| PERSON |     3 |    60 |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |   6 |    TABLE ACCESS FULL | PERSON |     3 |    60 |     3   (0)| 00:00:01 |
    |   7 |   TABLE ACCESS FULL  | PERSON |     3 |    60 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("M"."CC"="PCC"."PID")
       2 - access("M"."T"="PT"."PID")
       3 - access("M"."F"="PF"."PID")
    PLAN_TABLE_OUTPUT
    Note
       - dynamic sampling used for this statement
    25 rows selected.
    Message was edited by:
            jeneesh
    No indexes created...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to specify more than Two Tables in NATURAL JOIN

    Hi,
    I am using Oracle9i R-2. I want help in writing a Query using Two Tables in SQL*PLUS. I am using ANSI/ISO Standrard for table-joins:
    select col1, col2, descr
    from tab1 natural join tab2
    There are two columns col1 & col2 is common between thse two tables. So, it will join them and query execute well.
    How can i use 3rd table tab3 in the same way in Natural Join...? If column col1 & col2 is available in tab3 also.
    I tried this way, but it gives me error:
    select col1, col2
    from tab1 natural join tab2 natural join tab3
    Is it possible to specify more than two tables in Natural Join Clause.
    Please check that out & help please. Thanks.
    Regards,
    Kamesh Rastogi

    I do not get an error when I try the same thing on the same version, as demonstrated below. Can you post your table structure and a copy and paste of a run of your actual query with the error that you are receiving?
    scott@ORA92> select banner from v$version
      2  /
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE     9.2.0.1.0     Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    scott@ORA92> select * from tab1
      2  /
          COL1       COL2 COL3
             1          1 A
            10         10 B
    scott@ORA92> select * from tab2
      2  /
          COL1       COL2 COL4
             1          1 C
            20         20 D
    scott@ORA92> select * from tab3
      2  /
          COL1       COL2 COL5
             1          1 E
            30         30 F
    scott@ORA92> select col1, col2, col3, col4, col5
      2  from tab1 natural join tab2 natural join tab3
      3  /
          COL1       COL2 COL3 COL4 COL5
             1          1 A    C    E
    scott@ORA92>

  • Right order of joining tables

    Hi everybody,
    I have read the SQL Tuning section of Performance Tuning Oracle Book of Oracle 10g. v.2.
    In 11.5.4. paragraph titled "Controlling the Access Path and Join Order with Hints" , in the second note there is a small paragraph about the right join of the tables....
    In whichever query i try ,i've noticed that altering the joining order of the tables the sql statistics (consistent gets , sorts(memory/disk)) are the same regardless of the join order....
    Can you please give me an example or a source in which the modification of the join order of the tables in a sql query produce different results ...in statistics????
    Thanks , a lot
    Simon

    Duplicate post. Don't answer this thread please Right order of joining tables.
    Cheers, APC

  • How do I change system settings so that users are not required to enter the mac's admin pw in order to join a wifi network?

    how do I change system settings so that users are not required to enter the mac's admin pw in order to join a wifi network?
    Right now my macbook pro requires an admin password before connecting to a new wifi network. In other words when a user that is not an admin tries to connect to a new wifi network the pop up displays indicating that it is locked and an admin password is required.
    Is there a way to remove this restriction so that a non admin can connect to wifi without the mac's admin password.

    You can enable / disable this option in System Preferences:
    System Preferences > Network > Wi-Fi > Advanced > Wi-Fi tab > Require administrator authorization to: Change networks

  • Tables of View Joined in Wrong Order When View Joined to Other Tables

    I have the following view:
    select
         distinct
         'PKG' item_type_code,
         msibk.organization_id,
         msibk.inventory_item_id
    from
         mtl_system_items_b_kfv msibk,
         mtl_item_categories mic,
         mtl_default_category_sets mdcs,
         mtl_categories_b_kfv mcbk
    where
         msibk.organization_id = mic.organization_id
         and msibk.inventory_item_id = mic.inventory_item_id
         and mic.category_set_id = mdcs.category_set_id
         --1 Inventory (Lookup = MTL_FUNCTIONAL_AREAS)
         and mdcs.functional_area_id = 1
         and mic.category_id = mcbk.category_id
         and mcbk.segment1 = 'EXP'
         and mcbk.segment2 in ( 'PACKAGING' )When I access the columns like this:
    select
    from
         xxcus_mtl_sys_item_types_v
    where
         organization_id = :1
         and inventory_item_id = :2
         and item_type_code = :3It correctly accesses MTL_SYSTEM_ITEMS_B second in the explain plan and everything is good.
    But when it is part of a join, it accesses MTL_SYSTEM_ITEMS_B last in the explain plan and has performance issues.
    select
         msi.segment1
    from
         xxcus_mtl_sys_item_types_v x,
         mtl_system_items msi
    where
         msi.organization_id = x.organization_id
         and msi.inventory_item_id = x.inventory_item_id
         and x.item_type_code = 'PAK'Any ideas why the view tables are getting joined incorrectly when the view is joined with another table?
    Thanks,
    Kurz

    The query I posted for the view is just an excerpt. It is several nearly identical queries with UNION ALL between them. I get the same results when I have only one query in the view.
    Here is the explain plan for the first query:
    | Id  | Operation                          | Name                         | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                   |                              |     5 |   160 |    25  (20)|
    |   1 |  VIEW                              | XXCUS_MTL_SYS_ITEM_TYPES_V   |     5 |   160 |    25  (20)|
    |   2 |   UNION-ALL                        |                              |       |       |            |
    |   3 |    SORT UNIQUE NOSORT              |                              |     1 |    71 |     5  (20)|
    |*  4 |     FILTER                         |                              |       |       |            |
    |   5 |      NESTED LOOPS                  |                              |     1 |    71 |     4   (0)|
    |   6 |       NESTED LOOPS                 |                              |     1 |    36 |     3   (0)|
    |   7 |        NESTED LOOPS                |                              |     1 |    17 |     1   (0)|
    |   8 |         TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |*  9 |          INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 10 |         INDEX UNIQUE SCAN          | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |* 11 |        INDEX RANGE SCAN            | MTL_ITEM_CATEGORIES_U1       |     1 |    19 |     2   (0)|
    |* 12 |       TABLE ACCESS BY INDEX ROWID  | MTL_CATEGORIES_B             |     1 |    35 |     1   (0)|
    |* 13 |        INDEX UNIQUE SCAN           | MTL_CATEGORIES_B_U1          |     1 |       |     0   (0)|
    |  14 |    SORT UNIQUE NOSORT              |                              |     1 |    63 |     5  (20)|
    |* 15 |     FILTER                         |                              |       |       |            |
    |  16 |      NESTED LOOPS                  |                              |     1 |    63 |     4   (0)|
    |  17 |       NESTED LOOPS                 |                              |     1 |    36 |     3   (0)|
    |  18 |        NESTED LOOPS                |                              |     1 |    17 |     1   (0)|
    |  19 |         TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 20 |          INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 21 |         INDEX UNIQUE SCAN          | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |* 22 |        INDEX RANGE SCAN            | MTL_ITEM_CATEGORIES_U1       |     1 |    19 |     2   (0)|
    |* 23 |       TABLE ACCESS BY INDEX ROWID  | MTL_CATEGORIES_B             |     1 |    27 |     1   (0)|
    |* 24 |        INDEX UNIQUE SCAN           | MTL_CATEGORIES_B_U1          |     1 |       |     0   (0)|
    |  25 |    SORT UNIQUE NOSORT              |                              |     1 |    71 |     5  (20)|
    |* 26 |     FILTER                         |                              |       |       |            |
    |  27 |      NESTED LOOPS                  |                              |     1 |    71 |     4   (0)|
    |  28 |       NESTED LOOPS                 |                              |     1 |    36 |     3   (0)|
    |  29 |        NESTED LOOPS                |                              |     1 |    17 |     1   (0)|
    |  30 |         TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 31 |          INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 32 |         INDEX UNIQUE SCAN          | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |* 33 |        INDEX RANGE SCAN            | MTL_ITEM_CATEGORIES_U1       |     1 |    19 |     2   (0)|
    |* 34 |       TABLE ACCESS BY INDEX ROWID  | MTL_CATEGORIES_B             |     1 |    35 |     1   (0)|
    |* 35 |        INDEX UNIQUE SCAN           | MTL_CATEGORIES_B_U1          |     1 |       |     0   (0)|
    |  36 |    SORT UNIQUE NOSORT              |                              |     1 |    71 |     5  (20)|
    |* 37 |     FILTER                         |                              |       |       |            |
    |  38 |      NESTED LOOPS                  |                              |     1 |    71 |     4   (0)|
    |  39 |       NESTED LOOPS                 |                              |     1 |    36 |     3   (0)|
    |  40 |        NESTED LOOPS                |                              |     1 |    17 |     1   (0)|
    |  41 |         TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 42 |          INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 43 |         INDEX UNIQUE SCAN          | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |* 44 |        INDEX RANGE SCAN            | MTL_ITEM_CATEGORIES_U1       |     1 |    19 |     2   (0)|
    |* 45 |       TABLE ACCESS BY INDEX ROWID  | MTL_CATEGORIES_B             |     1 |    35 |     1   (0)|
    |* 46 |        INDEX UNIQUE SCAN           | MTL_CATEGORIES_B_U1          |     1 |       |     0   (0)|
    |  47 |    SORT UNIQUE NOSORT              |                              |     1 |    71 |     5  (20)|
    |* 48 |     FILTER                         |                              |       |       |            |
    |  49 |      NESTED LOOPS                  |                              |     1 |    71 |     4   (0)|
    |  50 |       NESTED LOOPS                 |                              |     1 |    36 |     3   (0)|
    |  51 |        NESTED LOOPS                |                              |     1 |    17 |     1   (0)|
    |  52 |         TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 53 |          INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 54 |         INDEX UNIQUE SCAN          | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |* 55 |        INDEX RANGE SCAN            | MTL_ITEM_CATEGORIES_U1       |     1 |    19 |     2   (0)|
    |* 56 |       TABLE ACCESS BY INDEX ROWID  | MTL_CATEGORIES_B             |     1 |    35 |     1   (0)|
    |* 57 |        INDEX UNIQUE SCAN           | MTL_CATEGORIES_B_U1          |     1 |       |     0   (0)|
    --------------------------------------------------------------------------------------------------------Here is the explain plan for the second query:
    | Id  | Operation                           | Name                         | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                    |                              |     5 |   240 |    10  (50)|
    |   1 |  NESTED LOOPS                       |                              |     5 |   240 |    10  (50)|
    |   2 |   VIEW                              | XXCUS_MTL_SYS_ITEM_TYPES_V   |     5 |   160 |     5 (100)|
    |   3 |    UNION-ALL                        |                              |       |       |            |
    |   4 |     HASH UNIQUE                     |                              |     1 |    71 |     1 (100)|
    |*  5 |      FILTER                         |                              |       |       |            |
    |   6 |       NESTED LOOPS                  |                              |    17 |  1207 |    77   (0)|
    |   7 |        NESTED LOOPS                 |                              |    16 |   992 |    77   (0)|
    |   8 |         NESTED LOOPS                |                              |     1 |    43 |     7   (0)|
    |   9 |          TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 10 |           INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 11 |          TABLE ACCESS BY INDEX ROWID| MTL_CATEGORIES_B             |     1 |    35 |     6   (0)|
    |* 12 |           INDEX RANGE SCAN          | MTL_CATEGORIES_B_N1          |    44 |       |     2   (0)|
    |* 13 |         TABLE ACCESS BY INDEX ROWID | MTL_ITEM_CATEGORIES          |    49 |   931 |    70   (0)|
    |* 14 |          INDEX RANGE SCAN           | MTL_ITEM_CATEGORIES_N3       |   441 |       |     4   (0)|
    |* 15 |        INDEX UNIQUE SCAN            | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |  16 |     HASH UNIQUE                     |                              |     1 |    63 |     1 (100)|
    |* 17 |      FILTER                         |                              |       |       |            |
    |  18 |       NESTED LOOPS                  |                              |  2158 |   132K|   250   (1)|
    |  19 |        NESTED LOOPS                 |                              |  2134 |   112K|   249   (0)|
    |  20 |         NESTED LOOPS                |                              |    44 |  1540 |     7   (0)|
    |  21 |          TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 22 |           INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |  23 |          TABLE ACCESS BY INDEX ROWID| MTL_CATEGORIES_B             |    44 |  1188 |     6   (0)|
    |* 24 |           INDEX RANGE SCAN          | MTL_CATEGORIES_B_N1          |    44 |       |     2   (0)|
    |* 25 |         TABLE ACCESS BY INDEX ROWID | MTL_ITEM_CATEGORIES          |    49 |   931 |    70   (0)|
    |* 26 |          INDEX RANGE SCAN           | MTL_ITEM_CATEGORIES_N3       |   441 |       |     4   (0)|
    |* 27 |        INDEX UNIQUE SCAN            | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |  28 |     HASH UNIQUE                     |                              |     1 |    71 |     1 (100)|
    |* 29 |      FILTER                         |                              |       |       |            |
    |  30 |       NESTED LOOPS                  |                              |    33 |  2343 |    77   (0)|
    |  31 |        NESTED LOOPS                 |                              |    33 |  2046 |    77   (0)|
    |  32 |         NESTED LOOPS                |                              |     1 |    43 |     7   (0)|
    |  33 |          TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 34 |           INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 35 |          TABLE ACCESS BY INDEX ROWID| MTL_CATEGORIES_B             |     1 |    35 |     6   (0)|
    |* 36 |           INDEX RANGE SCAN          | MTL_CATEGORIES_B_N1          |    44 |       |     2   (0)|
    |* 37 |         TABLE ACCESS BY INDEX ROWID | MTL_ITEM_CATEGORIES          |    49 |   931 |    70   (0)|
    |* 38 |          INDEX RANGE SCAN           | MTL_ITEM_CATEGORIES_N3       |   441 |       |     4   (0)|
    |* 39 |        INDEX UNIQUE SCAN            | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |  40 |     HASH UNIQUE                     |                              |     1 |    71 |     1 (100)|
    |* 41 |      FILTER                         |                              |       |       |            |
    |  42 |       NESTED LOOPS                  |                              |    17 |  1207 |    77   (0)|
    |  43 |        NESTED LOOPS                 |                              |    16 |   992 |    77   (0)|
    |  44 |         NESTED LOOPS                |                              |     1 |    43 |     7   (0)|
    |  45 |          TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 46 |           INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 47 |          TABLE ACCESS BY INDEX ROWID| MTL_CATEGORIES_B             |     1 |    35 |     6   (0)|
    |* 48 |           INDEX RANGE SCAN          | MTL_CATEGORIES_B_N1          |    44 |       |     2   (0)|
    |* 49 |         TABLE ACCESS BY INDEX ROWID | MTL_ITEM_CATEGORIES          |    49 |   931 |    70   (0)|
    |* 50 |          INDEX RANGE SCAN           | MTL_ITEM_CATEGORIES_N3       |   441 |       |     4   (0)|
    |* 51 |        INDEX UNIQUE SCAN            | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |  52 |     HASH UNIQUE                     |                              |     1 |    71 |     1 (100)|
    |* 53 |      FILTER                         |                              |       |       |            |
    |  54 |       NESTED LOOPS                  |                              |    17 |  1207 |    77   (0)|
    |  55 |        NESTED LOOPS                 |                              |    16 |   992 |    77   (0)|
    |  56 |         NESTED LOOPS                |                              |     1 |    43 |     7   (0)|
    |  57 |          TABLE ACCESS BY INDEX ROWID| MTL_DEFAULT_CATEGORY_SETS    |     1 |     8 |     1   (0)|
    |* 58 |           INDEX UNIQUE SCAN         | MTL_DEFAULT_CATEGORY_SETS_U1 |     1 |       |     0   (0)|
    |* 59 |          TABLE ACCESS BY INDEX ROWID| MTL_CATEGORIES_B             |     1 |    35 |     6   (0)|
    |* 60 |           INDEX RANGE SCAN          | MTL_CATEGORIES_B_N1          |    44 |       |     2   (0)|
    |* 61 |         TABLE ACCESS BY INDEX ROWID | MTL_ITEM_CATEGORIES          |    49 |   931 |    70   (0)|
    |* 62 |          INDEX RANGE SCAN           | MTL_ITEM_CATEGORIES_N3       |   441 |       |     4   (0)|
    |* 63 |        INDEX UNIQUE SCAN            | MTL_SYSTEM_ITEMS_B_U1        |     1 |     9 |     0   (0)|
    |  64 |   TABLE ACCESS BY INDEX ROWID       | MTL_SYSTEM_ITEMS_B           |     1 |    16 |     1   (0)|
    |* 65 |    INDEX UNIQUE SCAN                | MTL_SYSTEM_ITEMS_B_U1        |     1 |       |     0   (0)|
    ---------------------------------------------------------------------------------------------------------

  • Need help to join two tables using three joins, one of which is a (between) date range.

    I am trying to develop a query in MS Access 2010 to join two tables using three joins, one of which is a (between) date range. The tables are contained in Access. The reason
    the tables are contained in access because they are imported from different ODBC warehouses and the data is formatted for uniformity. I believe this cannot be developed using MS Visual Query Designer. I think writing a query in SQL would be suiting this project.
    ABCPART links to XYZPART. ABCSERIAL links to XYZSERIAL. ABCDATE links to (between) XYZDATE1 and ZYZDATE2.
    [ABCTABLE]
    ABCORDER
    ABCPART
    ABCSERIAL
    ABCDATE
    [ZYXTABLE]
    XYZORDER
    XYZPART
    XYZSERIAL
    XYZDATE1
    XYZDATE2

    Thank you for the looking at the post. The actual table names are rather ambiguous. I renamed them so it would make more sense. I will explain more and give the actual names. What I do not have is the actual data in the table. That is something I don't have
    on this computer. There are no "Null" fields in either of the tables. 
    This table has many orders (MSORDER) that need to match one order (GLORDER) in GLORDR. This is based on MSPART joined to GLPART, MSSERIAL joined to GLSERIAL, and MSOPNDATE joined if it falls between GLSTARTDATE and GLENDDATE.
    [MSORDR]
    MSORDER
    MSPART
    MSSERIAL
    MSOPNDATE
    11111111
    4444444
    55555
    2/4/2015
    22222222
    6666666
    11111
    1/6/2015
    33333333
    6666666
    11111
    3/5/2015
    This table has one order for every part number and every serial number.
    [GLORDR]
    GLORDER
    GLPART
    GLSERIAL
    GLSTARTDATE
    GLENDDATE
    ABC11111
    444444
    55555
    1/2/2015
    4/4/2015
    ABC22222
    666666
    11111
    1/5/2015
    4/10/2015
    AAA11111
    555555
    22222
    3/2/2015
    4/10/2015
    Post Query table
    GLORDER
    MSORDER
    GLSTARTDATE
    GLENDDATE
    MSOPNDATE
    ABC11111
    11111111
    1/2/2015
    4/4/2015
    2/4/2015
    ABC22222
    22222222
    1/5/2015
    4/10/2015
    1/6/2015
    ABC22222
    33333333
    1/5/2015
    4/10/2015
    3/5/2015
    This is the SQL minus the between date join.
    SELECT GLORDR.GLORDER, MSORDR.MSORDER, GLORDR.GLSTARTDATE, GLORDR.GLENDDATE, MSORDR.MSOPNDATE
    FROM GLORDR INNER JOIN MSORDR ON (GLORDR.GLSERIAL = MSORDR.MSSERIAL) AND (GLORDR.GLPART = MSORDR.MSPART);

  • OJ syntax for multi-table left outer join with MS Oracle Driver

    I have a multi-table left outer join that works fine in SQL Server ODBC Driver, Oracle ODBC driver 8.01.07.00, but not with Microsoft ODBC Driver for Oracle 2.573.7326.0
    SELECT * from { oj A LEFT OUTER JOIN B ON A.col1 = B.col1 LEFT OUTER JOIN C ON A.col1 = C.col1 }
    I noticed someone had a similar problem (the proposed solution doesn't work):
    http://www.justpbinfo.com/listarchive/msg02874.html
    Does anyone know how to get this working with the Microsoft ODBC Driver for Oracle? Or does it just not work?

    The Microsoft ODBC Driver for Oracle 2.573.7326.0 does perform the same 'fix up' with {oj} in Oracle 8i. The problem is that it doesn't work when joining more than two tables:
    This works:
    SELECT * from { oj A LEFT OUTER JOIN B ON A.col1 = B.col1}
    This doesn't work:
    SELECT * from { oj A LEFT OUTER JOIN B ON A.col1 = B.col1 LEFT OUTER JOIN C ON B.col1 = C.col1 }
    (The second query will work with the Oracle Oracle ODBC driver, with a bit of tweaking. But I haven't found a way to get it to work with the Microsoft ODBC Driver for Oracle 2.573.7326.0. My suspicion is that it just doesn't work.)
    Gavin

  • Want to add one more table in Inner join

    Hi all,
    my code is show below.
    SELECT a~budat a~mblnr b~matnr b~menge b~bwart
             INTO CORRESPONDING FIELDS OF TABLE it_rawmat
             FROM mkpf as a inner join mseg as b on a~mblnr = b~mblnr
             where b~bwart = '261' and b~werks in werks and b~matnr in matnr and a~budat in budat.
    this code is get two table with inner join.
    But now i want to get BOM quantity from Mast and stpo so can u please help me how can i add this both table in this
    select statement.
    i describe stlnr,menge,idnrk,matnr this four field in it_rawmat table.
    now how can i fetch value MENGE from stpo throw mast .
    Thanks in Advance
    keyur

    Here is sample example where more then two tables are join.
    SELECT  p~carrid p~connid f~fldate b~bookid
      INTO  CORRESPONDING FIELDS OF TABLE itab
      FROM  ( ( spfli AS p
                INNER JOIN sflight AS f ON p~carrid = f~carrid AND
                                           p~connid = f~connid    )
                INNER JOIN sbook   AS b ON b~carrid = f~carrid AND
                                           b~connid = f~connid AND
                                           b~fldate = f~fldate     )
      WHERE p~cityfrom = 'FRANKFURT' AND
            p~cityto   = 'NEW YORK'  AND
            f~seatsmax > f~seatsocc. 

  • Change tables order

    Hi
    I'm trying to do a java application, using unmanaged ras, which change tables order.
    I tried 2 methods but the two of them seems to have a bug.
    In the first one I tried to move one table to the end and when i displayed the tabels looked just fine but when I save the report the changes are lost.
    In the second I saved the table in a temporary table I removed it (after i erase manually the field from the report just to see if this method works) and then I add the saved table.This method do what I want except the fact that the newtable that I add had other connection info even if i put it the connection info from the erased table.And now is like I select the data from 2 different datasources and I don't want that.I use odbc connection and the old table has
    Database DLL : crdb_odbc.dll and the new one has Database DLL:crdb_query.dll and this is not the only difference.
    Here I paste part of my code to clarify the things:
      public static void main( String[] args )
              init();     //this method initialize the ras server I don't paste
                            //the code because this works just fine and I think is
                            //not rellevant for my problems
              try{
                   ReportClientDocument reportClientDocument1 = new ReportClientDocument(  );
                   reportClientDocument1.setReportAppServer( reportAppSession.getReportAppServer(  ) );
                   reportClientDocument1.open("rassdk://C:/tmp/bbb.rpt",0);     
                  changetables(reportClientDocument1,alias );
                   reportClientDocument1.saveAs("bbb1.rpt", "rassdk://C:/tmp",1);
                   reportClientDocument1.close();
                   System.out.println("doc bbb1 saved");
            catch(ReportSDKException ex1){
                   ex1.printStackTrace();
              catch(IOException ex2){
                   ex2.printStackTrace();
              try{
                   ReportClientDocument reportClientDocument1 = new ReportClientDocument(  );
                   reportClientDocument1.setReportAppServer( reportAppSession.getReportAppServer(  ) );
                   reportClientDocument1.open("rassdk://C:/tmp/bbb.rpt",0);     
                  removeaddtable(reportClientDocument1,alias );
                   reportClientDocument1.saveAs("bb2.rpt", "rassdk://C:/tmp",1);
                   reportClientDocument1.close();
                   System.out.println("doc bbb2 saved");
            catch(ReportSDKException ex1){
                   ex1.printStackTrace();
              catch(IOException ex2){
                   ex2.printStackTrace();
    public static void changetables(ReportClientDocument rpt,String alias)
         int poz;
         try{
         poz=rpt.getDatabaseController().getDatabase().getTables().findByAlias(alias);
         if (poz!=-1){
              ITable auxtable=rpt.getDatabaseController().getDatabase().getTables().getTable(poz);
              rpt.getDatabaseController().getDatabase().getTables().remove(poz);
              rpt.getDatabaseController().getDatabase().getTables().add(auxtable);
              System.out.println("change table method complete");
         }catch(ReportSDKException e){
              e.printStackTrace();
    public static void removeaddtable(ReportClientDocument rpt,String alias)
         int poz;
         try{
         rpt.getDatabaseController().logon("snr","snr");
         poz=rpt.getDatabaseController().getDatabase().getTables().findByAlias(alias);
        if (poz != -1)
             IConnectionInfo ci=rpt.getDatabaseController().getDatabase().getTables().getTable(poz).getConnectionInfo();
             Table newTable=(Table)((Table)rpt.getDatabaseController().getDatabase().getTables().getTable(poz)).clone(true);
             rpt.getDatabaseController().removeTable(alias);
             TableLinks tl=rpt.getDatabase().getTableLinks();
             newTable.setConnectionInfo(ci);
             rpt.getDatabaseController().addTable(newTable, tl);
             System.out.println("removeaddtable method complete");
         }catch(ReportSDKException ex1){
                   ex1.printStackTrace();
    I hope you can tell me how should I modify the method changetables or
    removeaddtable to obtain what I want.

    Hi Jason,
    How to change the order of tables within sheets
    Make a table active by clicking in it once to select that table, then drag it by the 'bullseye' (top left, I have placed a red circle to show the bullseye):
    After dragging the table down:
    Table 1 is now below Table 2.
    The blue line is an Alignment Guide
    Two types of Guide:
    1. Menu > View >Show Rulers. Drag Alignment Guides from a ruler to where you want them.
    2. Menu > Numbers > Preferences > Rulers > Alignment Guides. Turn on (tick) both guides. That allows you to align objects with *each other* (as well as with the ruler guides). These guides help to align objects left, middle, right, top, bottom.
    Alignment Guides do not show unless you are moving an object.
    to drag/move table to another sheet in the one file
    Not possible in Numbers 3. The Sheets Pane has gone. Instead, select the entire table (click once in the table to make it active, then click on the bullseye). Copy (or Cut if you are brave). Go to another Sheet and Paste.
    Also can you change the size of sheet tab width on tab toolbar, so I can see more sheets at once??
    No. Let's hope this will be added in future updates. However, you can drag a Sheet tab left or right to reorder them.
    Another tip: each Sheet tab shows the contents of that Sheet, with some options such as Duplicate and Delete:
    Regards,
    Ian.

  • "Missing information in order to join" error for Shared Calendars

    I have shared Calendars before with various people and they all work flawlessly. Unforunately, one person who I am trying to share a calendar with got a "Missing information in order to join" error message when she tries to join. I have no idea why this is happening. She has a hotmail email address. Any idea/suggestions as to why this could be happening?
    I am using a 4S, she is using a 4.

    Yup, I got the same thing.  Further info:  I set up the shared list on my mac, then sent the list to my wife who tried to open it on her iPhone 5 and got redirected to the iCloud sign in page and then got the above error.  We then tried it via her hotmail account and signing into iCloud on a web browser on her computer.  Same error.
    Edit:  Further further info:  the ability to share a Reminder list is new in 10.8.2.  It can't be done via the iCloud web interface or the iPhone interface.
    Anybody know how to solve this?

  • Issues while joining two tables as the joining column has duplicate values - Please help!

    Hi,
    I have a table A -which has few columns including a Amount column - I am joining this table A to Table B. The joining column in B has duplicates.  So, the number of records are getting more after the joining. As per the requirment when I create a table
    after joining the tables and count the salary clumn, there is a difference in the counting. How can I solve this? Can you please help me?
    Here is the DDL and sample values
    create table #student (sid int, name varchar(10),salary int)
    create table [#address] (sid int, city varchar(10),grade char(1),lineneumber int)
    insert into #student values (1,'sachin',8000)
    insert into #student values (2,'Dhoni',2000)
    insert into #student values (3,'Ganguly',7000)
    insert into #student values (4,'Kohli',1000)
    insert into [#address] values(1,'mumbai','A',1)
    insert into [#address] values(1,'mumbai','B',2)
    insert into [#address] values(1,'mumbai','C',3)
    insert into [#address] values(1,'mumbai','D',4)
    insert into [#address] values(2,'JARKHAND','D',3)
    insert into [#address] values(2,'JARKHAND','D',4)
    SELECT S.SID,NAME,salary,CITY ,grade,linenumber
    into #FINAL
    FROM #STUDENT S
    LEFT JOIN #ADDRESS A
    ON S.SID=A.SID
    SELECT SUM(salary) FROM #FINAL
    --44000
    Final result should be 18000 , but it is coming as 44000. can you please help me to get the correct result - what do i do in the joining?
    In my real project, i have 5 tables joining, each table have more than 30 columns and few joining tables joining column have duplicates. I have simplified the issue so that i can ask the question clearly. So,while answering, please consider that also in mind.
    thanks in advance for your help!

    SELECT S.SID,NAME,salary,CITY 
    into #FINAL
    FROM #STUDENT S
    LEFT JOIN (SELECT DISTINCT sid,city
    FROM #Address) A
    ON S.SID=A.SIDthis will do a join on student table and city table with unique sid and city name so adddress selection will be sid city1 mumbai2 jarkand

Maybe you are looking for

  • Oracle 11 can not connect with toad

    Hello to all, I just installed oracle 11 on my pc running vista. I can connect to the data base using sqlplus but not with Toad (version 8.6.1). I enter user and password and nothing happens. Not even an error message. I was using previously oracle 1

  • IOS Numbers - Korean Hangul text not formatting correctly in cells

    For example, I'm trying to enter the Korean word '가면' into cells but the text is not grouping correctly. The final letter 'ㄴ' is not associated with the related syllable. Instead of '가면', I get '가며ㄴ'. I don't get this problem in others apps, only Num

  • EBooks book will not close, I have opened my first book (as a pdf) and it will not close. Not sure what to do.

    Hi, I have iPad Model MC916ZP/A with version 6.1.3 I have started to download ebooks in a pdf format, which I sync from my PC (via iTunes).  This has been successful and initially I could see all the books in eBooks bookshelf.  I opened one, skipped

  • DGMGRL 11gr2 switchover issues

    Hi all, im new to 11gr2 datagaurd setup using DGMGRL and currently troubleshooting an issue with switchover which was setup by teammate and he is on annual leave. Details: 11gr2 linux 64-bit RHEL5 both Prod and DR is configured with same DBNAME,INSTA

  • Silent Flash player Autoupdate over internet without user interaction

    Is it possible to set Flash Player to auto update without ever having any user interaction?  We don't have any internal application depending on flash player so I would like to install an version of flash update with auto update settings and forget i