A dimension table outer join across two databases

I have two databases of the same schema but may have different data that I would like to do comparisons on. For this discussion, each has two tables, Dimension and Fact. I created a common dimension which would show dimension data that exists on both databases. However, I want a common dimension which is a full outer join of the two Dimension tables that can be used to view data on the Fact tables on the two databases; this seems to be a little difference than a fact which may having missing value, isn't it? should this outer join occurs at the physical or logical? Can I even do it at physical if the data are from two different source? Any recommendation on what is the best way to do so? Thanks

It depends on how you are defining your BM. Always, BM is for creating joins on folders within BM, in the sense that each folder can contain data from within multiple databases. So, create it in Physical layer and also create new joins for your defined facts dimensions in BM. But remember, cross database joins are not recommended. If both your schemas reside on 2 different oracle databases, you would be better off creating a single view (by creating a dblink between these 2 databases). So, create a single view and include that in the physical layer.
Thanks,
Venkat
http://oraclebizint.wordpress.com

Similar Messages

  • Outer joins across multiple databases

    I'm trying to join three tables: 2 from data warehouse and 1 from Siebel database in OBIEE. I create the physical and logical joins (no errors or warnings). The model looks like this: Account Address (table 1) -> Account (table 2) -> Siebel Customer Data (table 3)
    I create two queries in Answers:
    (1) Account.Number and Siebel.Address (the query works)
    (2) Account Address.Zip, Account.Number, and Siebel.Address (the query gets the following error):
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42019] Join condition, D901.c3 <> 0, contains predicates that are currently not supported for outer joins across multiple databases. (HY000)
    Can someone help me understand why the join between the two databases works for the first query but when I add a second table it fails?
    thanks...

    Either you can link the Oracle DB into Access (by using File/Get External Data/Link Tables)
    or you have to simulate the join in Java by doing two separate queries and looping through the results.

  • Forcing full outer join between two facts according to common dimensions

    Hi everyone,I have an issue with the way obiee "joins" 2 fact tables regarding according to common dimensions.
    Let's assume 2 fact tables F1 and F2 and 2 dimension D1 and D2.
    Fi is joined to Dj thanks to IDs.
    F1 and F2 have got aggregates sum(mes1), respectively sum(mes2).
    The group by is performed on dim1 for D1 and dim2 for D2.
    The following 2 queries work fine...but separately:
    select dim1, dim2, sum(mes1) from F1, D1, D2 where ... group by dim1, dim2; //7 lines
    select dim1, dim2, sum(mes2) from F2, D1, D2 where ... group by dim1, dim2; //8 lines
    When I try to select dim1, dim2, sum(mes1) and sum(mes2), the following sql is created by the BI server:
    WITH SAWITH0 AS (
    select dim1, dim2, sum(mes1) c3 from F1, D1, D2 where ... group by dim1, dim2
    ), SAWITH1 AS (
    select dim1, dim2, sum(mes2) c3 from F2, D1, D2 where ... group by dim1, dim2
    select ... dim1,
         ... dim2,
         ... SAWITH0.c3,
         ... SAWITH1.c3
    FROM SAWITH0 LEFT OUTER JOIN SAWITH1
         on SAWITH0.dim1=SAWITH1.dim1 and SAWITH0.dim2=SAWITH1.dim2
    I get only 7 lines. It means I miss one line from the second query on F2.
    The solution is to perform a full outer join. (I tried in TOAD and changing LEFT by FULL is ok)
    How can I force the full outer join?
    Thanks a lot!

    If you use the fact vertical capabilities of OBIEE, it will normally perform a full outer join :
    http://gerardnico.com/wiki/dat/obiee/logical_sql/obiee_full_outer_join
    Check here for an example (replace the fact cross join by your second fact table F2)
    http://gerardnico.com/wiki/dat/obiee/bi_server/design/obiee_densification_design_preservation_dimension
    Cheers
    Nico

  • Joins across multiple databases using jdbc

    I have two databases, Access and Oracle. I can read and write to them, but now I need to execute an outer join. How would I construct the join in Java? I'd also like to store the result in Access. Thanks in advance.

    Either you can link the Oracle DB into Access (by using File/Get External Data/Link Tables)
    or you have to simulate the join in Java by doing two separate queries and looping through the results.

  • Outer join between two Contexts not working

    Hi,
    I have two contexts. A Context and B Context. To define hierachy or to show the both contexts data in single table/report in Web-I, i joined main tables of both contexts with a join. In those main two tables i want to show the table1 data irrespective of corresponding data exist in second table.
    To solve that i tried LEFT/RIGHT outer joins but nothing solved my prob. Because of those were in different context, I suppose. But it's not the same case when i work within a context (Single).
    Hope you got my prob now...!! Please help me out...
    Thank You!!

    Thanks Rohit for your reply.
    Nope, i can't cpntinue without having that join between those two tables. It must be there to get the exact results.
    It's not the prob of using Merged Dimensions... those are useful for another purpose. In my case those two Dimensions have different sets of data and have relation between those two.
    Like:
    Tab-1------Tab2
    Prod1------Cat1
    Prod1------Cat2
    Prod2------Cat3
    Prod3------Cat4
    Prod4------(NULL)
    As per requirement i should show the row for empty, in my ex it's in Prod4.
    If i use two SQL's prob:
    I can't relate those two and which have relation more over interdependent. Shows data as two separate tables in report.
    If i use multiple dataproviders:
    Prob Tab2 is has other joins with other tables to complete the project hierarchy.
    Hope you got it...
    Thank You!!

  • Display all dates between date range (Time Dimension left outer join Fact)

    All,
    I have done some searching around this issue but within all the posts regarding date variables, date prompts and date filtering I haven't seen one exactly answering my issue (maybe they are and I just dont have my head around it correctly yet).
    My report requirement is to allow a user to select a start day and an end day. The report should show all activity between those two days - AND display 0/null on days where there is no activity. That second part is where I am getting hung up.
    The tables in question are:
    TimeDim
    EventFact
    CustomerDim
    My BMM is setup as follows:
    TimeDim left outer join EventFact
    CustomerDim inner join EventFact
    If I run a report selecting DAY from TimeDim and a measure1 from EventFact with day range 1/1/2010 - 12/31/2010 .. I get a record for every day and it looks perfect because of the left outer join between TimeDim and CustomerDim.
    But .. if I add in a field from CustomerDim, select TimeDim.DAY, CustomerDim.CUSTNAME, EventFact.MEASURE1, OBIEE only returns records for the days that have EventFact records.
    This is due to the fact that the TimeDim is still outer joined into EventFact but adding in CustomerDim makes OBIEE setup an inner join between those tables which then causes only data to be returned where EventFact data exists.
    There is a way around this in this simple case and that is to define the relationship between CustomerDim and EventFact as an outer join as well. This will give the desired effect (but an outer join between these two tables is not the true relationship) and as I add additional dimensions and add additional logical sources to a single dimension in the BMM it gets complicated and messy.
    Ive also messed with setting the driving table in the relationship, etc.. but it has not given the desired effect.
    Has anyone ever encountered the need to force display all dates within a specfied range with a fact table that may not have an entry for every date?
    Thanks in advance.
    K
    Edited by: user_K on Apr 27, 2010 11:32 AM

    It worked!!!* Even my time drill downs and date based filtering still work!
    That is awesome. Never would have thought of that intuitively.
    Now, just need a little help understanding how it works. When I run my report and check the logs I can see that two queries are issued:
    Query 1: Joins the fact table to all the associated dimensions. I even changed all the relationships to inner joins (which is what they truly are). And calculates the original measure. If I copy and paste this query into sql developer it runs fine but only returns those rows that joined to the time dimension - which is what was happening before. It is correct but I wanted a record for every time dimension record.
    Query 2: Looks like the following:
    select sum(0)
    from timedim
    where date between <dateprompt1> and <dateprompt2>
    group by month *<--* this is the time dimension level specified in Query 1, so it knows to aggregate to the month level as was done in query 1
    Final Question: So what is OBIEE doing ultimately, does it issue these two requests and then perform a full outer join or something to bring them together? I couldn't see anywhere in the log a complete query that I could just run to see a similar result that I was getting in Answers.
    Thanks for all the help .. Id give more points if I could.
    K

  • Consistency Warning - [39008] Dimension Table not joined to Fact Source

    I have a schema in which I have the following tables:
    A) Patient Transaction Fact Table (i.e. supplies used, procedures performed, etc.)
    B) Demographic Dimension table (houses info like patient location code)
    C) Location Dimension table (tells me what Hospital each unique Location maps to)
    So table A is the fact, and table B is a dimension table joined to table A based on Patient ID, so I can get general info on the patient. This would allow me to apply logic to just see patient transactions where the patient was FEMALE, or was in the Emergency Room, by applying conditions to these fields in table B.
    Table C is a simple lookup table joined to table B by Location Code, so I can identify which hospital's emergency room the patient was located in for instance.
    So the schema is: A<---B<---C, where B and C are both dimension tables.
    The query works as desired, but my consistency check gives me the following WARNING:
    *[39008] Logical dimension table LOCATION MASTER D has a source LOCATION MASTER D that does not join to any fact source.*
    How do I resolve this WARNING, or at least suppress it?

    Hi,
    What you need to do is to add the (physical) location dimension table to the logical table source of the demographic dimension, for example by dragging it from physical layer on top of logical table source of demographic logical dimension table in bmm layer
    Regards,
    Stijn

  • Need to update column in table from joining the two tables

    Hi
    i want to update a table by joining two table but i m getting the below error
    single row subquery returns more than one value.
    i m using following query
    update table2
    set deposite_date=(select a.deposit_date from table1 a,table2 b
    where a.ban=b.ban and (a.deposit_date between b.cy_start_date and b.due_date))
    table2
    ban due_date cy_start_date deposite_date
    100 5/6/2011 22/05/2011
    101 7/11/2011 22/05/2011
    102 5/25/2011 22/05/2011
    table1
    ban      deposit_date
    100      04/12/2011
    100      04/15/2011
    102      03/25/2011
    101      04/26/2011
    101      05/06/2011
    101      07/26/2011
    can i insert latest deposit_date from table1 which lies between b.cy_start_date and b.due_date
    Thanks

    Hi,
    Welcome to the forum!
    876466 wrote:
    Hi
    i want to update a table by joining two table but i m getting the below error
    single row subquery returns more than one value.Exactly!
    (   SELECT  a.deposit_date
        FROM    ...returns all deposit_dates.
    (   SELECT  MAX (a.deposit_date)
        FROM    ...would return only the latest one.
    Also, you need to correlate the sub-query to the main query, so that it only looks for rows with the same ban.
    i m using following query
    update table2
    set deposite_date=(select a.deposit_date from table1 a,table2 b
    where a.ban=b.ban and (a.deposit_date between b.cy_start_date and b.due_date))
    table2
    ban due_date cy_start_date deposite_date
    100 5/6/2011 22/05/2011
    101 7/11/2011 22/05/2011
    102 5/25/2011 22/05/2011
    table1
    ban      deposit_date
    100      04/12/2011
    100      04/15/2011
    102      03/25/2011
    101      04/26/2011
    101      05/06/2011
    101      07/26/2011
    can i insert latest deposit_date from table1 which lies between b.cy_start_date and b.due_datePerhaps you need something like this:
    UPDATE  table2     b
    SET     deposit_date     =
             (    SELECT  MAX (a.deposit_date)
                   FROM      table1           a
               WHERE      a.ban          = b.ban
               AND      a.deposit_date BETWEEN b.cy_start_date
                               AND     b.due_date
    ;Notice that table1 is the only table in the FROM clause of the sub-query, but the sub-query is correlated to table2, so we can reference columns from table2 in the sub-query.
    Whenever you have a problem, post CREATE TABLE and INSERT statements for your sample data.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    If you're asking about a DML statement, such as UPDATE, the CREATE TABLE and INSERT statements should re-create the tables as they are before the DML, and the results will be the contents of the changed table(s) when everything is finished.
    Always say which version of Oracle you're using.
    Edited by: Frank Kulash on Aug 1, 2011 1:58 PM

  • Outer join for a database view

    Dear Experts,
    Could you tell me what is the outer join and the example of this?
    Is it possible I can create an outer join view for generic extraction?
    Thanks.
    Arthur

    This is what a nested loops would look like in ABAP.  It is not a function module, but it could be made into one very easily.
    REPORT zz_temp.
    DATA: l_t_tstc    TYPE TABLE OF tstc,
          l_t_tstct   TYPE TABLE OF tstct,
          l_s_tstc    TYPE tstc,
          l_s_tstct   TYPE tstct.
    SELECT *
    INTO CORRESPONDING FIELDS OF l_s_tstc
    FROM tstc AS t.
      SELECT tt~ttext
      INTO CORRESPONDING FIELDS OF l_s_tstct
        FROM tstct AS tt
        WHERE tt~tcode = l_s_tstc-tcode
        AND tt~sprsl = sy-langu.
      ENDSELECT.
      WRITE:/ l_s_tstc-tcode,l_s_tstct-ttext.
    ENDSELECT.

  • Physical query generation: unneeded dimension tables get joined to the fact

    Hi there!
    The setup is the following:
    There is a logical fact table which is joined to 7 logical dimensions, it has 4 table sources which correspond to different time dimension levels (all other dimensions are mapped to Detail level).
    Time dimension logical table also has 4 different table sources (for days, months, quarters, and years).
    The data source is an Oracle Database 11gR2.
    The problem is:
    No matter what the logical query is, in the physical query all 7 joins are performed, even if the resulting data is then simply discarded. This results in very bad query performance.
    I feel that it is somehow related to the level-based fragmentation (since, for instance, inclusion of time dimension columns in SELECT list (not in WHERE) seems to affect physical queries), but lack sufficient knowledge to solve this problem or put up with it.
    My questions are the following:
    1) Have you ever encountered such a situation?
    2) Can unneeded joins be eliminated?
    2.1) If yes, how?
    2.2) If not, then why are they needed?
    Thanks in advance!

    Physical level:
    D01-D06 - ordinary physical tables.
    D_DATES - all time levels from dates to years, D_MONTHS - time levels from months to years, also D_QUARTERS and D_YEARS.
    F_DAILY - fact table joined to all of the D01-D06 and to D_DATES, F_MONTHLY - joined to D01-D06 and D_MONTHS, also F_QUARTERLY and F_YEARLY. All measure columns are the same.
    Logical level:
    D01-D06 correspond to ordinary logical tables with a single table source. Logical dimensions are created.
    D_TIME is a logical time dimension with four levels (dates, months, quarters, and years) and four table sources ( D_DATES, D_MONTHS, D_QUARTERS, and D_YEARS ).
    F is a fact table with four logical table sources ( F_DAILY, F_MONTHLY, F_QUARTERLY, and F_YEARLY ) with aggregation content levels set correspondingly.
    OBIEE correctly picks physical table sources for different time levels, but generates extremely inefficient SQL (joining all dimension sources in a WITH-subquery, doing ROW_NUMBER over a result set, and then discarding half the columns, which were not needed to start with).

  • Table Data Join across different hosts.

    I'm trying to create a table using data from three different tables on two different databases, two on one host, the third being on a different one. Is is possible?
    Example:
    Database: DB1
    Table: Table1 t1
    Host: Host1
    User: dbuser1
    Pass: dbpass1
    Database: DB2
    Table: Table2 t2
    Host: Host2
    User: dbuser2
    Pass: dbpass2
    Database: DB2
    Table: Table2a t2a
    Host: Host2
    User: dbuser2
    Pass: dbpass2
    If all 3 tables were on the same host, I would write the query as:
    select t1.column1,t2.column2,t2a.column3
    from table1 t1,table2 t2,table2a t2a
    where t1.column1=t2.column1
    and t1.column2=t2.column2
    and t1.column1=t2a.column1
    and t2a.column2=t2.column2
    I know it's going to a lot more difficult than the above. If someone could please help me, I'd greatly appreciate it.
    Thank you,
    Daniel

    Just to make sure that you know that is almost as easy as you thought. It sounds like this is a one time thing, but please follow the recommendations of others as well:
    Make sure you can connect to both DB1 and DB2 from host1.
    From DB1
    create database link DB2 connect to dbuser2 identified by dbpass2 using 'DB2';
    select t1.column1,t2.column2,t2a.column3
    from table1 t1,table2@DB2 t2,table2a@DB2 t2a
    where t1.column1=t2.column1
    and t1.column2=t2.column2
    and t1.column1=t2a.column1
    and t2a.column2=t2.column2;
    Go and take a nap.
    And the performance saving synonyms wink wink....
    create synonym db2table2 for table2@DB2;
    create synonym db2table2a for table2a@DB2;
    Presents us with this query:
    select t1.column1,t2.column2,t2a.column3
    from table1 t1,db2table2 t2,tdb2table2a t2a
    where t1.column1=t2.column1
    and t1.column2=t2.column2
    and t1.column1=t2a.column1
    and t2a.column2=t2.column2;
    As you can see all it really does is give you a layer abstraction, nothing performance wise.
    -J

  • Outer join with Filter condition

    Hi there,
    I need some help with Data Services. I am creating an outer join between two tables and one of them has filter condition but it creates and outerjoin and apply the filter condition to the whole result set.
    SELECT "IWFMR13T_VEH_NTK_TMP1"."ACTY_DT" , "IWFMR13T_VEH_NTK_TMP1"."VEH_CL" , "IWFMR13T_VEH_NTK_TMP1"."VEH_NO" , "IWFMR13T_VEH_NTK_TMP1"."SRVC_NO" , "IWFMR13T_VEH_NTK_TMP1"."SRVC_STRT_DT" , "IWFMR13T_VEH_NTK_TMP1"."FR_SRVC_SEQ_NO" , "IWFMR13T_VEH_NTK_TMP1"."TO_SRVC_SEQ_NO" , "IWFMR13T_VEH_NTK_TMP1"."FR_ACTY_TS" , "IWFMR13T_VEH_NTK_TMP1"."TO_ACTY_TS" , "IWFMR13T_VEH_NTK_TMP1"."MINS_ON_TRN" , "IWFMR13T_VEH_NTK_TMP1"."VEH_STA_CD" , "IWFMR13T_VEH_NTK_TMP1"."MAJ_VEH_CD" , "IWFMR13T_VEH_NTK_TMP1"."VEH_DIST_KM" , "IWFMR13T_VEH_NTK_TMP1"."VEH_NET_TN" , "IWFMR13T_VEH_NTK_TMP1"."VEH_GROS_TN" , "IWFMR13T_VEH_NTK_TMP1"."VEH_NTK" , "IWFMR13T_VEH_NTK_TMP1"."VEH_GTK" , "IWFMR13T_VEH_NTK_TMP1"."HLNG_LOCO_MPU" , "IWFMR13T_VEH_NTK_TMP1"."09_HLNG_LOCO_FL" , "IWFMR13T_VEH_NTK_TMP1"."LOCO_MPU" , "IWFMR11T_SGMT_LCNT"."SUM_LOCO_MPU" , "IWFMR13T_VEH_NTK_TMP1"."SRVC_BUS_GRP_CD" , "IWFMR13T_VEH_NTK_TMP1"."SRVC_COAL_MRKR_CD" 
    FROM "DBO"."IWFMR13T_VEH_NTK_TMP1" "IWFMR13T_VEH_NTK_TMP1"
    LEFT OUTER JOIN "DBO"."IWFMR11T_SGMT_LCNT" "IWFMR11T_SGMT_LCNT"
    ON ( "IWFMR11T_SGMT_LCNT"."SRVC_NO" = "IWFMR13T_VEH_NTK_TMP1"."SRVC_NO" ) AND( "IWFMR11T_SGMT_LCNT"."SRVC_STRT_DT" = "IWFMR13T_VEH_NTK_TMP1"."SRVC_STRT_DT" ) AND( "IWFMR11T_SGMT_LCNT"."FR_SRVC_SEQ_NO" = "IWFMR13T_VEH_NTK_TMP1"."FR_SRVC_SEQ_NO" ) AND( "IWFMR11T_SGMT_LCNT"."TO_SRVC_SEQ_NO" = "IWFMR13T_VEH_NTK_TMP1"."TO_SRVC_SEQ_NO" )
    WHERE ( "IWFMR13T_VEH_NTK_TMP1"."09_HLNG_LOCO_FL" = 'Y')
    While, what I need is as under
    SELECT "IWFMR13T_VEH_NTK_TMP1"."ACTY_DT" , "IWFMR13T_VEH_NTK_TMP1"."VEH_CL" , "IWFMR13T_VEH_NTK_TMP1"."VEH_NO" , "IWFMR13T_VEH_NTK_TMP1"."SRVC_NO" , "IWFMR13T_VEH_NTK_TMP1"."SRVC_STRT_DT" , "IWFMR13T_VEH_NTK_TMP1"."FR_SRVC_SEQ_NO" , "IWFMR13T_VEH_NTK_TMP1"."TO_SRVC_SEQ_NO" , "IWFMR13T_VEH_NTK_TMP1"."FR_ACTY_TS" , "IWFMR13T_VEH_NTK_TMP1"."TO_ACTY_TS" , "IWFMR13T_VEH_NTK_TMP1"."MINS_ON_TRN" , "IWFMR13T_VEH_NTK_TMP1"."VEH_STA_CD" , "IWFMR13T_VEH_NTK_TMP1"."MAJ_VEH_CD" , "IWFMR13T_VEH_NTK_TMP1"."VEH_DIST_KM" , "IWFMR13T_VEH_NTK_TMP1"."VEH_NET_TN" , "IWFMR13T_VEH_NTK_TMP1"."VEH_GROS_TN" , "IWFMR13T_VEH_NTK_TMP1"."VEH_NTK" , "IWFMR13T_VEH_NTK_TMP1"."VEH_GTK" , "IWFMR13T_VEH_NTK_TMP1"."HLNG_LOCO_MPU" , "IWFMR13T_VEH_NTK_TMP1"."09_HLNG_LOCO_FL" , "IWFMR13T_VEH_NTK_TMP1"."LOCO_MPU" , "IWFMR11T_SGMT_LCNT"."SUM_LOCO_MPU" , "IWFMR13T_VEH_NTK_TMP1"."SRVC_BUS_GRP_CD" , "IWFMR13T_VEH_NTK_TMP1"."SRVC_COAL_MRKR_CD" 
    FROM "DBO"."IWFMR13T_VEH_NTK_TMP1" "IWFMR13T_VEH_NTK_TMP1"
    LEFT OUTER JOIN "DBO"."IWFMR11T_SGMT_LCNT" "IWFMR11T_SGMT_LCNT"
    ON ( "IWFMR11T_SGMT_LCNT"."SRVC_NO" = "IWFMR13T_VEH_NTK_TMP1"."SRVC_NO" ) AND( "IWFMR11T_SGMT_LCNT"."SRVC_STRT_DT" = "IWFMR13T_VEH_NTK_TMP1"."SRVC_STRT_DT" ) AND( "IWFMR11T_SGMT_LCNT"."FR_SRVC_SEQ_NO" = "IWFMR13T_VEH_NTK_TMP1"."FR_SRVC_SEQ_NO" ) AND( "IWFMR11T_SGMT_LCNT"."TO_SRVC_SEQ_NO" = "IWFMR13T_VEH_NTK_TMP1"."TO_SRVC_SEQ_NO" ) AND  ( "IWFMR13T_VEH_NTK_TMP1"."09_HLNG_LOCO_FL" = 'Y')
    Please let me know, how to fix this issue. If you have come across such issue before. If need be I can send you the ATL file for this data flow. 
    BTW, I am using Data Services XI 3.2 (12.2.0.0) and the database is SQL 2005, both on Windows Platform.
    Thanks & regards,
    Doshi Bhavesh

    Hi,
    Use two query transforms;
    First will only connect to IWFMR13T_VEH_NTK_TMP1 and use it to apply filter  "IWFMR13T_VEH_NTK_TMP1"."09_HLNG_LOCO_FL" = 'Y'
    In second query transform perform outer join on IWFMR11T_SGMT_LCNT and output of first query.
    This should give required result.
    If you are using single query transform join will be performed at DB level and if you use custom sql in query transform it will not have increased load on DB. I will recommend to use custom sql to get good performance.
    Sachin

  • OBIEE not applying outer join syntax to filters

    (Note: I've already thoroughly searched the forums before posting this. Thanks)
    My problem is the following:
    I'm trying to build a report that is a count from my fact table, grouped by month from my date dimension for a given year, resulting in 12 data points. The problem is that not all months have actual data, but I still need those months to show on the report with a count of zero. Typical simple reporting requirement.
    I have already done the obvious and within my business layer made the join between my fact table and my date dimension an outer join on the fact side, just like you'd do if writing the query by hand. And when tested by hand this includes all dates for the year anyway, and when coupled with the appropriate null test on the count measure I'd get my 12 data points with zeros were appropriate.
    The problem is that there are additional filters I need to apply on the fact data (there are a couple text-based code values that didn't warrant full tables themselves so are just degenerate dimensions directly on the fact table.)
    When these filters are applied at the Answer level, I'm only getting back the months that actually have data, and lose the months where the count should be zero. A check of the session log for the query that was generated shows the problem. While OBI properly generates the outer-join syntax for the join itself between the two tables (my date dim and fact table) it does NOT apply the outer-syntax to the constant-based filter against the fact, effectively negating the outer join.
    Actual query from the log (I simply changed the table aliases from the ugly T##### stuff OBI generates to something more readable for posting here):
    select D.DT_MONTH_NAME as c1,
    D.DT_MONTH_NUM as c2,
    I.INC_TYPE as c3,
    I.INC_EMP_GROUP as c4,
    sum(case when I.INC_KEY is null then 0 else 1 end ) as c5
    from DATE_DIM D, INCIDENT_F I
    where ( D.DATE_KEY = I.DATE_KEY (+) ) and ( D.DT_YEAR = 2010 and I.INC_EMP_GROUP = 'CONTRACTOR' )
    group by D.DT_MONTH_NUM, D.DT_MONTH_NAME, I.INC_TYPE, I.INC_EMP_GROUP
    order by c2
    You can see that the outer syntax (+) is applied to the join, but not to the filter on I.INC_EMP_GROUP. If I take this query and drop it in something like SQL Developer, it only returns the months with data. If I throw the (+) after I.INC_EMP_GROUP like I'd do if writing this by hand, the desired zero-months results pop back in.
    I have already searched the forums and while lots of people seem to have asked this question, the only solutions involve things like trickery in the business layer using dummy fact tables followed by manipulations at the report level etc. Unfortunately I can't rely on these as the system is eventually to be turned over to users who can't be expected to apply various hacks to write reports.
    Anyone ever get to the bottom of getting OBI to apply outer join logic in filters as well, when the filtered table is meant to be outer-joined to?
    Any comments are appreciated.
    John

    I know that this thread is a bit old thought it might be helpful to some one...
    The Issue is, when using Degener@teDimen$ion ( this is !nner joned to FACT tables in BMM) and if any of the dimensions {other than theDegener@teDimen$ion (Let us say Dim X) } have an ()uter join to any of the fact tables, and you were doing your analysis using Degener@teDimen$ion,  Dim X, Measure value you will face the following issues.
    when filtering the analysis on the ()uter join dimension ( Dim X), the IN filter will not work. Reason is that the filter is getting applied to both the Dimension and FACT tables and the values that exist in Dimension Dim X but not in FACT table wont show up.
         The above issue can be fixed by changing the join between the fact and Degener@teDimen$ion from inner to outer. I think this is a bug.. because  it is supposed to filter the fact  table after the entire outer joined result is obtained but not filter the fact table for the Dim X values and do a outer join. I think the BI should be intelligent enough.

  • Fact vertical capabilities - Full outer Join - How to?

    Hi,
    I have the same problem described in another post: Forcing full outer join between two facts according to common dimensions
    I will use the same example:
    Let's assume 2 fact tables F1 and F2 and 2 dimension D1 and D2.
    Fi is joined to Dj thanks to IDs.
    F1 and F2 have got aggregates sum(mes1), respectively sum(mes2).
    The group by is performed on dim1 for D1 and dim2 for D2.
    The following 2 queries work fine...but separately:
    select dim1, dim2, sum(mes1) from F1, D1, D2 where ... group by dim1, dim2; //7 lines
    select dim1, dim2, sum(mes2) from F2, D1, D2 where ... group by dim1, dim2; //8 lines
    When I try to select dim1, dim2, sum(mes1) and sum(mes2), the following sql is created by the BI server:
    WITH SAWITH0 AS (
    select dim1, dim2, sum(mes1) c3 from F1, D1, D2 where ... group by dim1, dim2
    ), SAWITH1 AS (
    select dim1, dim2, sum(mes2) c3 from F2, D1, D2 where ... group by dim1, dim2
    select ... dim1,
    ... dim2,
    ... SAWITH0.c3,
    ... SAWITH1.c3
    FROM SAWITH0 LEFT OUTER JOIN SAWITH1
    on SAWITH0.dim1=SAWITH1.dim1 and SAWITH0.dim2=SAWITH1.dim2
    I get only 7 lines. It means I miss one line from the second query on F2.
    The solution is to perform a full outer join between both queries..
    The reply was a link to fact vertical capabilities of OBIEE
    (http://gerardnico.com/wiki/dat/obiee/logical_sql/obiee_full_outer_join)
    (http://gerardnico.com/wiki/dat/obiee/bi_server/design/obiee_densification_design_preservation_dimension)
    In this post the solution is to add a dummy fact table to force a crossjoin.
    This solution don't work in my case because I don't need to return all the members of the dimension, I just need to return the dimension member that are joined to both facts..
    if in the example, the dimension have 20 member with the fact vertical capabilities solution my reports will show 20 rows... and I only want to see 8 rows...
    Any Idea?
    Thanks...

    I found what was the real problem:
    I have two diferent physical and logical Facts with 4 common dimensions and 1 dimesion that only affect to the second fact.
    In my report I'm filtering for this last dimension so the OBI use this query (the more restrictive) and made a left join with the second result...
    The problem is what I need is filter only by the column, but I cant do it because I'm using a column selector and I can't do a FILTER USING statement using a dashboard prompt...
    Any Idea?
    Thanks

  • How to do left outer join in one-one mapping

    I tried to do a left outer join between two tables. I specified
    kodo.jdbc.DBDictionary: JoinSyntax=sql92 in kodo.properties. I used
    ref-join-type="outer" in the package.mapping. However, I still see Kodo is
    translating my queries using inner join. How can I force kodo to use outer
    join (or maybe even to use left outer join) when translating my queries?
    Thanks.

    Kodo will automatically use an outer join when eager-fetching a to-one
    relation (unless you have set null-value="exception" on the field, in
    which case Kodo knows it can use an inner join). There is no need to set
    the ref-join type (in fact, that is only for when the foreign key
    columns are in a joined table).
    When you place criteria on a relation in a query, though, the relation
    must exist to satisfy the query. For example, in the filter:
    "relation.x == y"
    The "relation" field must hold a related object to satisfy the
    expression, just as in Java.
    If you want the "relation" field to optionally be null, then write your
    filter exactly as you would in Java:
    "relation == null || relation.x == y"
    Kodo will correctly use an outer join in this case because the filter
    can be satisfied even when no related object exists.

Maybe you are looking for

  • I need a specialist for the FUBA VIEWCLUSTER_MAINTENANCE_CALL

    HI I have to call via VIEWCLUSTER_MAINTENANCE_CALL a view which is part of a viewcluster. I already called a view on objectlevel 2 with successfully with additional selection-criteria. Coding: TYPES: BEGIN OF vclty_sellist_for_object,          object

  • Do I need to backup my files when upgrading from tiger to leopard?

    Not sure if I need to backup all my files before upgrading from Tiger to Leopard (to use a Mac Box Set), have bought a Seagate 1TB FreeAgent GoFlex Home hard drive to back up on. Was told I wouldn't need a WiFi router but have now discovered I would

  • SAP Note 1614681 - ESI monthly report for filing details of ESIable employe

    Any one implemented this SAP Note While doing the manual steps mentioned in SAP Note 1614681 - ESI monthly report for filing details of ESIable employees . we found some difficulties. Please let me know the steps that you followed while implementing

  • How to Change OpenHub Destination

    Hi All, I would like to change OPEN HUB Destination name... and how to change DSO name... I couldn't find any option in BI 7.0 NW2004s... I search sdn someone said, change open hub table name... how to do that ? please verify Thank

  • Default XML element - Sample Code

    Hi, I am trying to use the sample code for the article "How to default an XML element in an XML document before inserting it into database". I am using database 9.2.0.3 and when I try to insert the record into the table, only up to "<Action>" part is