Complex Join in RPD with Subquery

Hi Experts,
We have a complex requirement in our RPD Development which needs to use a subquery in the complex join in Physical layer. Here are the tables:
Fact A
DIM B
Join is A.case_no = B.case_no
   and ( a.active_date between b.start_date and b.end_date or
             (a.active_date < b.start_date and
              b.start_date = (select min(b2.start_date)
                                          from DIM B2
                                         where b.case_no = b2.case_no
                                         group by b2.case_no
Is there a way other than creating opaque view or making ETL changes to having the min(start_date) as part of the table ?
Appreciate your inputs and responses.
Thanks
VK

you got 2 tables or 3?
I see 3 tables A, B and B2
you need to join B with B2 time being just ignore min value since its equi join you get matching only
and then B with A
in bmm map B2 to B

Similar Messages

  • OBIEE 11g - complex join in physical layer

    Hi, I need to create a complex join in the physical layer with join criteria like the following:
    fact.fiscal_year = dim.fiscal_year and fact.accounting_period <= dim.accounting_period
    Every time I try to do this, I get the nQSError: 37005 Transaction Update Failed message. Any ideas what is going on?
    Thanks,
    Scott

    Actually, I (finally) got it to work - wow logical joins are a big pain in the butt in 11g. First off, I had to edit the RPD offline, couldn't get it to work (at all) online.
    Next I had to delete the existing joins...there appears to be no way to change an existing FK join into a logical join.
    Next created the logical joins as stated in my original post - but had to fiddle with it for about 15 minutes to get it to work. You can NOT click the two columns on the dim side, two columns on the fact side, and then just edit the default formula (which defaults to have = sign between the expressions) - because it creates a FK join, and then you start getting errors. Instead, I had to build the expression from scratch.
    All in all, 11g has gotten much less flexible and easy to use in this regard.
    Scott

  • Joining two tables with different DB

    Hi
    We have 2 sources DB2 and Oracle.
    In DB2 we have two tables which stores.
    Tbl1
    Case_no     Information1     Information2     Information3
    11112     sddf     asd     null null
    11113     asd     asd     null null
    Tbl2
    Inf     Info1     Code     Info3
    Xedy     Asdf     111     afder
    Mad     Tag     123     top
    The above tables are complex join with this condition
    Tbl1.case_no=Tbl1.case_no.
    Oracle tbl
    Code     Code_desc
    111     Very good
    123     bad
    My requirement is to join the tbl2 with Oracle tbl. Based on the codes in DB2 table I should display the Code_desc in my reports. Like this
    Case_no     Code     Code_desc
    11112     111     Very good
    11113     123     bad
    But I am getting the Cartesian result.
    Case_no     Code     Code_desc
    11112     111     Very good
    11112     123     bad
    11113     111     Very good
    11113     123     bad
    Please help to resolve.
    Regards
    MD

    Select Oracletbl and tbl2, right click on them open physical diagram, selected objects. In the physical diagram page Create a join between Oracletbl and tbl2 with the condition code=code.
    In business model create a complex join between these two. Now reload metadata/restart services check output.
    Let me know if this does not work you.

  • Slow connect by prior ... start with subquery in 9i

    Has anyone come across a performance problem (compared to 8i) when using hierarchical queries where the START WITH list is generated by a subquery? The culprit seems to be an extra visit to the subquery block as part of the CONNECT BY WITH FILTERING operation.
    For example, take a simple tree structure:
    CREATE TABLE tree
    id NUMBER,
    parentid NUMBER
    CONSTRAINT tree_pk PRIMARY KEY (id)
    ...and a subquery - here just a table called sample with a subset of the ids from the tree table:
    CREATE TABLE sample
    id NUMBER,
    CONSTRAINT sample_pk PRIMARY KEY (id)
    ...with which to drive the start points of the treewalk:
    SELECT parentid, id, label
    FROM tree
    CONNECT BY PRIOR parentid = id
    START WITH id IN
    SELECT id FROM SAMPLE
    With the tables populated and analyzed, I get this from 8i:
    Execution Plan
    .0......SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=19)
    .1....0...CONNECT BY
    .2....1.....NESTED LOOPS (Cost=1 Card=1280 Bytes=10240)
    .3....2.......INDEX (FAST FULL SCAN) OF 'ID_PK' (UNIQUE) (Cost=1 Card=1280 Bytes=5120)
    .4....2.......INDEX (UNIQUE SCAN) OF 'TREE_PK' (UNIQUE)
    .5....1.....TABLE ACCESS (BY USER ROWID) OF 'TREE'
    .6....1.....TABLE ACCESS (BY INDEX ROWID) OF 'TREE' (Cost=2 Card=1 Bytes=19)
    .7....6.......INDEX (UNIQUE SCAN) OF 'TREE_PK' (UNIQUE) (Cost=1 Card=1)
    Statistics
    .....0..recursive calls
    .....4..db block gets
    .15687..consistent gets
    ....59..physical reads
    .....0..redo size
    223313..bytes sent via SQL*Net to client
    .38276..bytes received via SQL*Net from client
    ...343..SQL*Net roundtrips to/from client
    .....3..sorts (memory)
    .....0..sorts (disk)
    ..5120..rows processed
    and this is 9i:
    Execution Plan
    .0......SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=19)
    .1....0...CONNECT BY (WITH FILTERING)
    .2....1.....NESTED LOOPS
    .3....2.......NESTED LOOPS (Cost=2 Card=1280 Bytes=10240)
    .4....3.........INDEX (FAST FULL SCAN) OF 'ID_PK' (UNIQUE) (Cost=2 Card=1280 Bytes=5120)
    .5....3.........INDEX (UNIQUE SCAN) OF 'TREE_PK' (UNIQUE)
    .6....2.......TABLE ACCESS (BY USER ROWID) OF 'TREE'
    .7....1.....NESTED LOOPS
    .8....7.......BUFFER (SORT)
    .9....8.........CONNECT BY PUMP
    10....7.......TABLE ACCESS (BY INDEX ROWID) OF 'TREE' (Cost=2 Card=1 Bytes=19)
    11...10.........INDEX (UNIQUE SCAN) OF 'TREE_PK' (UNIQUE) (Cost=1 Card=20480)
    12....1.....INDEX (UNIQUE SCAN) OF 'SAMPLE_PK' (UNIQUE) (Cost=1 Card=1 Bytes=4)
    Statistics
    .....1..recursive calls
    .....1..db block gets
    .20525..consistent gets
    ....72..physical reads
    ...120..redo size
    224681..bytes sent via SQL*Net to client
    .38281..bytes received via SQL*Net from client
    ...343..SQL*Net roundtrips to/from client
    .....9..sorts (memory)
    .....0..sorts (disk)
    ..5120..rows processed
    ..so, about another 5000 logical reads, corresponding to the extra access of the sample table at the bottom of the query plan. So instead of just visiting the START WITH subquery once, to kick off the treewalk, I seem to be revisiting it for every row returned. Not too bad if that happens to be a unique index scan as here but that's not always the case.
    I know I've got new options for re-writing this as a join under 9i, I'm just curious about those extra lookups and why they're necessary.
    Cheers - Andrew

    There is undocumented parameter in Oracle 9i "_old_connect_by_enabled"
    which controls the behavoiur of hierarchy queries in 9i and above:
    You can try to return to 8i behaviour using it:
    SQL> SELECT parentid, id
      2  FROM tree
      3  CONNECT BY PRIOR parentid = id
      4  START WITH id IN
      5  (
      6  SELECT id FROM SAMPLE
      7  )
      8  /
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=1 Card=1 Bytes=26)
       1    0   CONNECT BY (WITH FILTERING)
       2    1     TABLE ACCESS (BY INDEX ROWID) OF 'TREE' (TABLE)
       3    2       NESTED LOOPS (Cost=2 Card=1 Bytes=26)
       4    3         TABLE ACCESS (FULL) OF 'SAMPLE' (TABLE) (Cost=2 Card
              =1 Bytes=13)
       5    3         INDEX (UNIQUE SCAN) OF 'TREE_PK' (INDEX (UNIQUE)) (C
              ost=0 Card=1 Bytes=13)
       6    1     NESTED LOOPS
       7    6       BUFFER (SORT)
       8    7         CONNECT BY PUMP
       9    6       TABLE ACCESS (BY INDEX ROWID) OF 'TREE' (TABLE) (Cost=
              1 Card=1 Bytes=26)
      10    9         INDEX (UNIQUE SCAN) OF 'TREE_PK' (INDEX (UNIQUE)) (C
              ost=1 Card=1)
      11    1     TABLE ACCESS (FULL) OF 'TREE' (TABLE) (Cost=1 Card=1 Byt
              es=26)
      12    1     INDEX (UNIQUE SCAN) OF 'SAMPLE_PK' (INDEX (UNIQUE)) (Cos
              t=1 Card=1 Bytes=13)
    SQL> alter session set "_old_connect_by_enabled" = TRUE;
    Session altered.
    SQL> SELECT parentid, id
      2  FROM tree
      3  CONNECT BY PRIOR parentid = id
      4  START WITH id IN
      5  (
      6  SELECT id FROM SAMPLE
      7  )
      8  /
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=1 Card=1 Bytes=26)
       1    0   CONNECT BY
       2    1     NESTED LOOPS (Cost=2 Card=1 Bytes=26)
       3    2       TABLE ACCESS (FULL) OF 'SAMPLE' (TABLE) (Cost=2 Card=1
               Bytes=13)
       4    2       INDEX (UNIQUE SCAN) OF 'TREE_PK' (INDEX (UNIQUE)) (Cos
              t=0 Card=1 Bytes=13)
       5    1     TABLE ACCESS (BY USER ROWID) OF 'TREE' (TABLE)
       6    1     TABLE ACCESS (BY INDEX ROWID) OF 'TREE' (TABLE) (Cost=1
              Card=1 Bytes=26)
       7    6       INDEX (UNIQUE SCAN) OF 'TREE_PK' (INDEX (UNIQUE)) (Cos
              t=1 Card=1)
    Rgds.

  • Slow connect by ... start with subquery in 9i

    Has anyone come across a performance problem (compared to 8i) when using hierarchical queries where the START WITH list is generated by a subquery? The culprit seems to be an extra visit to the subquery block as part of the CONNECT BY WITH FILTERING operation.
    For example, take a simple tree structure:
    CREATE TABLE tree
    id NUMBER,
    parentid NUMBER
    CONSTRAINT tree_pk PRIMARY KEY (id)
    ...and a subquery - here just a table called sample with a subset of the ids from the tree table:
    CREATE TABLE sample
    id NUMBER,
    CONSTRAINT sample_pk PRIMARY KEY (id)
    ...with which to drive the start points of the treewalk:
    SELECT parentid, id, label
    FROM tree
    CONNECT BY PRIOR parentid = id
    START WITH id IN
    SELECT id FROM SAMPLE
    With the tables populated and analyzed, I get this from 8i:
    Execution Plan
    .0......SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=19)
    .1....0...CONNECT BY
    .2....1.....NESTED LOOPS (Cost=1 Card=1280 Bytes=10240)
    .3....2.......INDEX (FAST FULL SCAN) OF 'ID_PK' (UNIQUE) (Cost=1 Card=1280 Bytes=5120)
    .4....2.......INDEX (UNIQUE SCAN) OF 'TREE_PK' (UNIQUE)
    .5....1.....TABLE ACCESS (BY USER ROWID) OF 'TREE'
    .6....1.....TABLE ACCESS (BY INDEX ROWID) OF 'TREE' (Cost=2 Card=1 Bytes=19)
    .7....6.......INDEX (UNIQUE SCAN) OF 'TREE_PK' (UNIQUE) (Cost=1 Card=1)
    Statistics
    .....0..recursive calls
    .....4..db block gets
    .15687..consistent gets
    ....59..physical reads
    .....0..redo size
    223313..bytes sent via SQL*Net to client
    .38276..bytes received via SQL*Net from client
    ...343..SQL*Net roundtrips to/from client
    .....3..sorts (memory)
    .....0..sorts (disk)
    ..5120..rows processed
    and this is 9i:
    Execution Plan
    .0......SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=19)
    .1....0...CONNECT BY (WITH FILTERING)
    .2....1.....NESTED LOOPS
    .3....2.......NESTED LOOPS (Cost=2 Card=1280 Bytes=10240)
    .4....3.........INDEX (FAST FULL SCAN) OF 'ID_PK' (UNIQUE) (Cost=2 Card=1280 Bytes=5120)
    .5....3.........INDEX (UNIQUE SCAN) OF 'TREE_PK' (UNIQUE)
    .6....2.......TABLE ACCESS (BY USER ROWID) OF 'TREE'
    .7....1.....NESTED LOOPS
    .8....7.......BUFFER (SORT)
    .9....8.........CONNECT BY PUMP
    10....7.......TABLE ACCESS (BY INDEX ROWID) OF 'TREE' (Cost=2 Card=1 Bytes=19)
    11...10.........INDEX (UNIQUE SCAN) OF 'TREE_PK' (UNIQUE) (Cost=1 Card=20480)
    12....1.....INDEX (UNIQUE SCAN) OF 'SAMPLE_PK' (UNIQUE) (Cost=1 Card=1 Bytes=4)
    Statistics
    .....1..recursive calls
    .....1..db block gets
    .20525..consistent gets
    ....72..physical reads
    ...120..redo size
    224681..bytes sent via SQL*Net to client
    .38281..bytes received via SQL*Net from client
    ...343..SQL*Net roundtrips to/from client
    .....9..sorts (memory)
    .....0..sorts (disk)
    ..5120..rows processed
    ..so, about another 5000 logical reads, corresponding to the extra access of the sample table at the bottom of the query plan. So instead of just visiting the START WITH subquery once, to kick off the treewalk, I seem to be revisiting it for every row returned. Not too bad if that happens to be a unique index scan as here but that's not always the case.
    I know I've got new options for re-writing this as a join under 9i, I'm just curious about those extra lookups and why they're necessary.
    Cheers - Andrew

    Hi Andrew,
    Just noticed you message. I have exact same performance problem. It's just killing ant other processes and runs forever.
    Could you please share you experience how to deal with "CONNECT BY" in 9i and also could you please tell about this option to re-write CONNECT BY as a join?
    Thank you very much,
    Victor

  • RE: Complex Join

    Hi Experts,
    I have few questions regarding complex joins
    1> First when we import the tables into the Physical layer we will do the FK Joins for the tables according to our requirement then in BMM layer we will create new business model next again why we have to make complex join in BMM layer already there is joins between the tables in physical layer which scenarios we have to make the Complex join if we won't do the complex join what will happens.
    2> Also if we do FK join in the place of complex join in BMM layer what will be the result.
    Thanks in Advance,

    Hi,
    we have two joins in OBIEE one is foreign key join and other one is complex join.Mostly 99% cases we use foreign key join in physical layer.we use complex join in phycical layer mostly in three scenarios.
    1)when there is extended join conditions.
    2)when we join key column of one table to non key column of other table.
    3)when the operator is other than equal to operator.
    In these 3 situations we can use complex join in physical layer.
    Next one is we have already joins in physical layer then what is the need to create complex joins in BMM layer right.
    The answer for this question is whenever user runs a report that will generate logical sql query our OBIEE understands only logical sql query this logical sql query generated based on the logical joins in BMM layer.
    Based on this logical joins only it will create most optimized sql query.And another reasons for creating logical joins is
    if we want to specify driving table it is possible only thriugh complex join in BMM layer.
    and if we want to specify type of join it is possible only thriugh complex join in BMM layer
    and if we want to specify cordinality it is possible only thriugh complex join in BMM layer
    and another one is my tool is not able to identify facts and dimensions because it has no intelligence,we need to incorporate the intelligence by giving logical joins only it identifies the facts and dimensions.
    so we have to create logical joins in BMM Layer..
    Give me Like,,if you aresatisified with my post.
    Thanks,
    Sai Pelluri

  • Multiple equility with subquery

    The following query gives error, I thought I can match multiple columns with subquery, how can I achive this problem?
        select * from answers where (survey_seq_id, main_group_id, sub_group_id) in
        (select survey_seq_id, main_group_id, sub_group_id from surveys s join answers a on s.survey_id = a.survey_seq_id
        where s.qa = 2 and a.main_group_id = 62
        group by survey_seq_id, sub_group_id having sum(decode(answer, 'Yes', 1, 0)) != 1);
    ORA-00979: bir GROUP BY ifadesi değil
    00979. 00000 -  "not a GROUP BY expression"
    *Cause:   
    *Action:
    Error at Line: 12 Column: 27thanks a lot.

    First step lets format your query nicely
    select *
      from answers
    where (
               survey_seq_id
          , main_group_id
          , sub_group_id
           ) in
              select survey_seq_id
                , main_group_id
                , sub_group_id
             from surveys s
             join answers a
               on s.survey_id = a.survey_seq_id
               where s.qa = 2
              and a.main_group_id = 62
               group
               by survey_seq_id
                , sub_group_id
           having sum(decode(answer, 'Yes', 1, 0)) != 1
    Now if you see the query inside IN there are 3 columns in SELECT list and only 2 in GROUP BY list. And your error clearly says +00979. 00000 - "not a GROUP BY expression"+
    main_group_id in the SELECT list is not used in the GROUP BY list
    And to add further your query can be simplified as
    select *
      from (
             select a.*
               , sum(decode(answer, 'Yes', 1, 0)) over(partition by survey_seq_id, main_group_id, sub_group_id) sum_val
               from answers a
               join surveys s
                 on s.survey_id = a.survey_seq_id
               where s.qa = 2
              and a.main_group_id = 62      
    where sum_val != 1;Edited by: Karthick_Arp on Feb 11, 2013 3:05 AM
    Added SQL With analytic function
    Edited by: Karthick_Arp on Feb 11, 2013 3:28 AM
    I missed surveys table in the query :(

  • Complex join goes missing during import

    morning,
    i got a complex join between 2 dimension tables (in physical layer: one table is alias of existing dimension table; other is geo hir table) which goes missing when i try to import the new SA into the existing repository (the join is in the new SA)
    there are 3 other complex joins (remaining geo hir tables that also join on alias table) which theoretically are identical and which dont go missing; i see no difference between any of them
    id appreciate any suggestions what i could check to prevent this from happening
    Edited by: UserMB on Apr 14, 2009 1:57 AM

    yes, i know its not supported
    during import the catalog is select for sure plus the security group
    i tried the merge too (following the instructions for merge with blank rep), but then it creates a second database connection instead of merging into existing one as though it would not recognize that its the same one

  • Complex join in physical layer

    Hi Experts,
    In which scenarios we will use complex join in physical layer i saw in many blogs that when we are using expressions and other than equality.
    For better under standing can any one post few scenarios on this.
    Regards,
    Rafi

    Hi,
    Always use “Foreign Key” joins, not “Complex Joins” on the Physical Layer
    Refer-http://obiee101.blogspot.com/2011/10/obiee11g-golden-rules-rpd-physical.html
    If your join looks like D_DATE = TRUNC(S_DATETIME) try add a extra column S_DATE in your DWH. Any matching processing done by the BI-server costs time and you often loose the advantage of an index in your DWH.
    For all others relationships other than a Primary Key-Foreign Key Relationships (expression other than equal to perform an equi join), you have to use a complex join otherwise you have to use a foreign key

  • I have just converted from PC to iMac. Yay. But pls be nice to me; I am back to newb! Running Lion. Have connected a Time Capsule as both a backup and WAP. I want to be able to join the network with my iPad, iPhone, iPod to print. How can I do this?

    Can I do this using the Time Capsule. I am not tech, so bear with me. Can I get the iPad to connect wirelessly to the TC, which connects wirelessly to the Canon MP495? Or, can I connect/network the iPad to the iMac to print?
    Either way, or if there is any other solution, I would appreciate if someone would walk me through it, or point me to a plain-speaking resource.
    Thankyou.
    Actually, one more: I would like to connect my HP laptop as well. I have heard this is not simple, but possible.

    You can create a wifi network with your TC, and you can join this network with your iPad. However, your printer does not support the AirPrint protocol, so you will not be able to print from your iPad, unless you load additional software.
    These are the steps:
    1.  (You may have completed this step already) Set up your TC to create a wireless network. You can do this from AirPort Utility on your Mac or from the AirPort Utility App on your iPad (free download from the App Store).
    2. From your iPad, go to settings / wifi and join the network.
    3. Download the Canon iPhone App from the App store on your iPad
    4. You can now print photos from your iPad to your Canon printer.
    If you want full functionality, (not just photos), there is software for your Mac that makes your printer available to your iPad through AirPrint (Printopia). The downside is, you have to purchase it, and you have to have your Mac running when you want to print from your iPad.
    Good luck!

  • What is the different between Logical complex join and Physical join?

    hi,
    Do somebody know what is the function different between logical complex join in BMM layer and physical join in physical layer?
    Thanks.

    Thank you very much1
    I understand their differentiation:
    In the BMM Complex join (intelligent), means OBI picks the best way from possibly many different ways to join using physical join. FK join forces the same join always, which limits flexibility.

  • Query with subquery should return value but doesn't

    When I run this SQL, it returns no value:
    SELECT vfn.cat
    FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = 2010
    AND vf.moratorium_fishery = 'T'
    AND vfn.vp_num = 211652
    AND vfn.ap_year = 2010
    AND vfn.plan = 'MUL'
    AND vfn.date_issued = (SELECT MAX(date_issued)
    FROM vps_fishery_ner
    WHERE vp_num = 211652
    AND ap_year = 2010);
    In order to test, I take out the subquery and run it separately:
    SELECT MAX(date_issued)
    FROM vps_fishery_ner
    WHERE vp_num = 211652
    AND ap_year = 2010;
    Returns 02-APR-10
    Then I paste this date into the original query (using the TRUNC function, of course, since I hardcode only the DDMMYY part of the date):
    SELECT vfn.cat
    FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = 2010
    AND vf.moratorium_fishery = 'T'
    AND vfn.vp_num = 211652
    AND vfn.ap_year = 2010
    AND vfn.plan = 'MUL'
    AND TRUNC(date_issued) = TO_DATE('02-APR-10');
    And this returns the required value, 'A'.
    So why doesn't the full query with subquery work, if the value that is returned by the subquery is valid and works when you just paste it in?
    Thanks.

    Hi,
    Not sure about your question.
    But you say when you uss 01-apr-10 you get the expected results.
    So why dont you try using trunc on botht sides
    SELECT vfn.cat
      FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
       AND vfn.cat = vf.cat
       AND vf.permit_year = 2010
       AND vf.moratorium_fishery = 'T'
       AND vfn.vp_num = 211652
       AND vfn.ap_year = 2010
       AND vfn.plan = 'MUL'
       AND trunc(vfn.date_issued) = (SELECT MAX(trunc(date_issued))
                                FROM vps_fishery_ner
                               WHERE vp_num = 211652
                                 AND ap_year = 2010);Rememeber if you are couting on some Index to be used you might want to recheck.
    IN answer to your question why it does not return with subquery included, because the TIME PART is not the same.
    You yourself proved it by using the supplying only the date part.
    Regards,
    Bhushan

  • Join fact table with higher dimension level

    how do i join fact tables with higher dimension levels with discoverer?
    fact with detail at level C
    measure X
    dimension with
    D->C->B->A
    E->C
    level
    A B C
    1------1------1
    2------2------1
    3------2------1
    join between fact X and dimension level C
    X=3*C because of sum(X) in discoverer and 3xC in dimension
    is there a way to get correct values for X without creating a dimension like
    D->C
    E->

    another way of asking this is whether you can create a summary table in Discoverer at a higher level than a dimension's fundamental grain. In other words - the summary examples in the documentation all describe leaving out one or more of your dimensions... they are either left in or completely taken out. But, some of the most effective summarization occurs when you summarize daily data to a monthly level. Assuming that I have a sales table (at a daily level, and a key value sales_date), and a table date_dim (primary key sales_date), I would like to create a summary sales_month_summary where the sales are grouped on month_year (which is a field in the sales_date table).
    How is this done? I suspect that we can't use the date_dim table with the summary (due to the problems noted by the poster above). Do we have to create another table "month_dim"? Do we have to fold all of the desired date attributes (month, quarter, year) into the summary? Obviously we'd like to re-use all of the pertinent already existing date items (quarter, month, year, etc.), not recreate them over again, which would result in essentially two sets of items in the EUL. [One used for this month summary, and another used for the detail.]
    I searched the forum - someone asked this same question back in 2000 - there was no answer provided.
    The only other thought I have is to "snowflake" the date_dim into two tables and two folders, one at a date level, another at the month level. Then the detail tables can connect to date_dim (which is linked to month_dim), while the summary data can connect directly to month_dim.

  • Left outer join 3 tables with where-statement

    Hi folks,
    I hope you can understand (and maybe solve) my problem.
    Generally I try to left outer join three tables. The third table is used for a WHERE-statement.
    The three table structures are the following:
    table 1 (user)   
    user1 | key
    table 2 (detail)  
    key | ID
    table 3 (header)
    ID | user2                 
    ...and I want to achieve the following structure (as example filled with data):
    user | key | ID
    |-----|----
    xy    | a    | 001
    xy    | b    | #
    z     | b     | #
    The clue ist the usage of the third table. I need the table to set user1 and user2 equal (WHERE) but there are two problems:
    1) Obviously I can't left outer join two tables with each other. In this case I already used the 'key' of table 1 to join it with the 'key' of table 2. So I can't left outer join the 'ID' of table 2 with the 'ID' of table 3. Error message that I can only left outer join a table once. Any proposals?
    2) I have to include a WHERE to equal user1 with user2. But I am not allowed to use the user2 from table 3 because of the left outer join.
    I tried this coding:
    SELECT auser1 akey b~id INTO TABLE itab FROM ( table1 AS a
      LEFT OUTER JOIN table2 AS b ON akey = bkey )
      LEFT OUTER JOIN table3 AS c ON bID = cID )
      WHERE auser1 = cuser2.
    I would really appreciate your help.
    Regards
    MrclSpdl

    IF you want to join a DB table with an internal table, you need to use the 'FOR ALL ENTRIES' statement.
    select dbfields
    into table itab2
    from dbtab
    for all entries in itab
    where dbfield1 = itab-field1.
    This will get you a second internal table with all the corresponding data for the first selection.  You can then join them with a loop through the first table and a read table on the second table (for 1 - 1 relation) or a nested loop statement on both tables (for 1 - N relation).  Make itab a hashed table when using read table with key, use a sorted table if you need to loop without key access.
    Regards,
    Freek

  • Why can't I join a network with my IPhone with IOS7?

    Why can't I join a network with my IPhone with IOS7?

    Hi gvtxman,
    The articles below may be able to help you troubleshoot your Wi-Fi issue.
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/TS1398?viewlocale=en_US
    Reset network settings by tapping Settings > General > Reset > Reset Network Settings.
    Note: This will reset all network settings including previously connected Wi-Fi networks and passwords
    iOS and OS X: Recommended settings for Wi-Fi routers and access points
    http://support.apple.com/kb/HT4199
    I hope this information helps ....
    Have a great day!
    - Judy

Maybe you are looking for

  • My IPhone 5 won't zinc to iTunes ??

    My iPhone 5 won't sinc to iTunes?? I have the latest version of iTunes on my computer and on my iPhone. When I plug in my phone it starts sincing, but it doesn't go any further than looking for purchases. Any information would be helpful! Thank you

  • Unresponsive keyboard Windows 7 Boot camp install

    Im trying to install Windows 7 onto my mid 2010 MacBook and seem to hit every problem possible. Now after I partitioned the hard drive and clicked continue, the "Windows is reading files" comes up and eventually an error occurs. "Windows has encounte

  • Convert AVCHD Progressive To Apple Intermediate Codec?

    Is there a really simple way to take AVCHD Progressive footage (1920 x 1080 at 50 fps) and convert it into Apple Intermediate Codec (AIC, 1920 x 1080 at 25 fps)? I ask because when I connect my Panasonic HC-V700 Camcorder to iMovie '11, all I see are

  • Path to EPS inbox is wrong

    The path to our EPS inbox shows as the one below which is wrong. lon-web-9\sapmnt\trans\EPS\in DIR_TRANS is set correctly in the parameters and all other paths are looking ok. I can't find anywhere to change this. Can anyone help?

  • Getting songs on my ipad

    I am trying to download songs onto my ipad but there are little dotted circles that are next to the new songs i got. How do i get these songs onto my ipad?