OUTER JOIN behaviour

Hi,
I have a Fact table which is joined with two Dim tables:
FACT -----DIM1 (FACT.key_col1= DIM1.key_col(+) )
\__DIM2 (FACT.key_col2= DIM2.key_col(+) )
Logical column:
col1 = DECODE(DIM2.val, 0, DIM2.desc, DIM1.desc)
In the business model:
FACT >----- DIM1 (Right Outer Join)
v
\___ DIM2 (Right Outer Join)
- In the LTS of DIM2, I have only DIM2 and in "General Tab\Map to these tables":
1. FACT - DIM2 : Right Outer Join
2. FACT - DIM1 : Right Outer Join
- In the "Column Mapping" of DIM2, I have:
col1 = CASE WHEN DIM2.val = 0 THEN DIM2.desc ELSE DIM1.desc END
The problem comes when I make a report with only one column from DIM2 (different from col1), for example: DIM2.name, OBIEE generates a query like this:
SELECT
DIM2.name
FROM
FACT,
DIM1,
DIM2
WHERE
FACT.key_col1= DIM1.key_col(+)
AND FACT.key_col2= DIM2.key_col(+)
The correct query should be:
SELECT
DIM2.name
FROM
FACT
DIM2
WHERE
FACT.key_col2= DIM2.key_col(+)
I have detected that if "INNER" type join is used, OBIE doesn't add a table that is not referenced in the report (in this case DIM1).
How can I make OBIEE generate the second query?
Thanks in advance,
Regards

Try this
http://obiee101.blogspot.com/2008/11/obiee-outerjoin-workaround.html
Regards,
Raghu

Similar Messages

  • Problem with outer joins and the class indicator/discriminator

    Hello,
    I am having a problem defining a query in toplink (10.1.3.3).
    In the workbench, I have created a parent and 2 child descriptors. The parent is "AbstractValue", the children are "DefaultValue", classified by the discriminator 'DEF', and "OverrideValue", classified by 'OVR', both located in the same table.
    Another descriptor (containing a one-on-one mapping to both a "DefaultValue", and a "OverrideValue") needs to be queried for its 'value'.
    The way the query should act is: If an override value (row) exists, this one applies for that object. If an override doesn't exist, return the default value.
    The query then comes down to (as I have it now):
    builder.getAllowingNull("OverrideValue").getAllowingNull("value").ifNull(builder.get("DefaultValue").get("value")).equal(builder.getParameter(VALUE_PARAM));
    The problem is that toplink adds the distinction for the different kind of "values" in the where clause WITHOUT checking for null values e.g. it performs an outer join, but then still checks for the discriminator value thus
    ....t1.ovr_id = t2.id(+) AND t2.discriminator = 'OVR' AND ...
    instead of
    ... LEFT JOIN values t2 ON (t1.ovr_id = t2.id AND t2.discriminator = 'OVR') ...
    This leads to the behaviour that the query returns ONLY the objects that have override and default values.
    An overview of the queries (simplified)
    Toplink, at the moment, returns only results if both override and default values exists:
    SELECT t1.id
    t1.def_id,
    t1.ovr_id
    FROM values t2,
    parameter t1,
    values t0
    WHERE nvl(t2.value, t0.value) = 15 AND
    t1.ovr_id = t2.id(+) AND t2.discriminator = 'OVR' AND
    t1.def_id = t0.id AND t0.discriminator = 'DEF'
    Situation Wanted:
    SELECT t1.id
    t1.def_id,
    t1.ovr_id
    FROM parameter t1
    LEFT JOIN values t2 ON (t1.ovr_id = t2.id AND t2.discriminator = 'OVR')
    JOIN values t0 ON (t1.def_id = t0.id AND t0.discriminator = 'DEF')
    WHERE nvl(t2.value, t0.value) = 15
    Anyone know if there is some statement I am missing to allow an actual outer join on descriptors containing class indicators/discriminators? A possible rewrite?
    Thanks in advance,
    Rudy

    This is a bug in TopLink's outer join support for Oracle. Currently the outer join is put in the where clause, instead of the from clause, as we do on other platforms. You might be able to fix it by changing your OraclePlatform to return false for shouldPrintOuterJoinInWhereClause().
    Please log this bug on EclipseLink, or through Oracle technial support.
    There is a workaround using,
    descriptor.getInhertiancePolicy().setAlwaysUseOuterJoinForClassType(true);
    James : http://www.eclipselink.org

  • Strange bug with Full Outer Join

    Hi guys,
    can you please confirm this behaviour on 11gR2? It used to work fine on 10gR1.
    Small test case:
    create table TEST_OBJECT_METADATA
      project_name  VARCHAR2(30 CHAR) not null,
      object_id     NUMBER not null
    create table TEST_OBJECT_INFO
      object_id          NUMBER not null,
      object_type        VARCHAR2(30) not null
    create table TEST_SUPPORTED_OBJECTS
      object_type    VARCHAR2(30 CHAR) not null,
      enabled        NUMBER(1));
    INSERT INTO TEST_OBJECT_METADATA VALUES ('NEW',1);
    INSERT INTO TEST_OBJECT_INFO VALUES (1, 'TABLE');
    INSERT INTO TEST_SUPPORTED_OBJECTS VALUES ('TABLE',1);
    COMMIT;When I execute the following query:
    WITH old_project AS
    (SELECT oi.object_type,
             oi.object_id
        FROM test_object_metadata om,
             test_object_info     oi
       WHERE om.object_id = oi.object_id
         AND project_name = 'OLD'),
    new_project AS
    (SELECT oi.object_type,
             oi.object_id
        FROM test_object_metadata om,
             test_object_info     oi
       WHERE om.object_id = oi.object_id
         AND project_name = 'NEW')
    SELECT src.object_type,
               t.enabled
      FROM (SELECT nvl(o.object_type, n.object_type) object_type
              FROM old_project o
              FULL OUTER JOIN new_project n
                ON o.object_id = n.object_id) src,
           test_supported_objects t
    WHERE src.object_type = t.object_type(+);I get the following output:
    OBJECT_TYPE     ENABLED
    TABLE             So, the outer join to test_supported_objects does not match.
    But if I force the FULL OUTER JOIN to run first using rownum:
    WITH old_project AS
    (SELECT oi.object_type,
             oi.object_id
        FROM test_object_metadata om,
             test_object_info     oi
       WHERE om.object_id = oi.object_id
         AND project_name = 'OLD'),
    new_project AS
    (SELECT oi.object_type,
             oi.object_id
        FROM test_object_metadata om,
             test_object_info     oi
       WHERE om.object_id = oi.object_id
         AND project_name = 'NEW')
    SELECT src.object_type,
               t.enabled
      FROM (SELECT nvl(o.object_type, n.object_type) object_type,
                           rownum
              FROM old_project o
              FULL OUTER JOIN new_project n
                ON o.object_id = n.object_id) src,
           test_supported_objects t
    WHERE src.object_type = t.object_type(+);I get the expected output:
    OBJECT_TYPE     ENABLED
    TABLE             1 Thanks in advance.

    Without mixing works fine:
    WITH old_project AS
    (SELECT oi.object_type,
             oi.object_id
        FROM test_object_metadata om,
             test_object_info     oi
       WHERE om.object_id = oi.object_id
         AND project_name = 'OLD'),
    new_project AS
    (SELECT oi.object_type,
             oi.object_id
        FROM test_object_metadata om,
             test_object_info     oi
       WHERE om.object_id = oi.object_id
         AND project_name = 'NEW')
    SELECT src.object_type,
           t.enabled
      FROM (SELECT nvl(o.object_type, n.object_type) object_type
              FROM old_project o,
                   new_project n   
              where  o.object_id = n.object_id(+)
              UNION
              SELECT nvl(o.object_type, n.object_type) object_type
              FROM old_project o,
                   new_project n   
              where  o.object_id(+) = n.object_id) src,
           test_supported_objects t
    WHERE src.object_type = t.object_type(+);but there shouldn't be any restrictions on mixing them, right?

  • Conditions on Outer Joined Tables

    I'm trying to understand how Discoverer handles conditions created on outer joined tables. We're using Discoverer Plus 11.1.1.3.
    I have a query using two tables connected by an outer join. While I want all records back from the first table, I don't want all records back from the outer joined table. So, if I typed the SQL directly in a SQL Editor, I would put the '(+)' in each condition. However, I find that in Discoverer, sometimes it does this, and sometimes it doesn't. If it does not put the '(+)' on all conditions as well as the join, that essentially nullifies the outer join and makes it an standard join.
    For example, I expanded an item on the outer joined table in the Items dialog to see its list of values, and selected one, to add the column to the worksheet and create a condition. No (+). But when I deleted this and created the condition using the Condition dialog, I got a (+). Then I created another condition using the condition dialog. I used the IN operator and pasted in a list (this item had no item class to choose from)--no (+).
    When I tried manually adding (+) after the item name in the condition dialog, it put quotes around the whole thing and treated it as a string.
    I can find nothing in the documentation that discusses this. Is is possible to control whether or not it uses the (+)?
    Thank you, Scott Newman

    Dear Michael,
    Last night I had a call from user who was experiencing a very strange behaviour of her Discoverer workbook.
    I replicated the issue on my machine and could not believe my eyes. A condition on an item was being ignored. I then analysed the workbook and realised it was due to a condition on an item from an outer-joined folder. I did not have the strength after a long day to deal with it and was looking forward to having some fun the next day. Firstly, I tried few tricks such as NVL, LENGTH functions in a test query in Toad. I hate to give up but I did and searched threads on this forum and opened few. The very first thread I read was this one and I laughed when I read your advice. Only until the moment I tested it in the troubled workbook. It worked like a charm. I take my hat off to you Michael. I have rarely experienced such a satisfaction when solving a tricky problem during my 9-year-long Oracle Discoverer journey. This goes straight to my little text file with interesting problems and solutions.
    Thank you very much. I owe you a beer or two.
    It is great to have an expert like you, always ready to share his knowledge with his colleagues.
    P.S.
    My apologies for this massive post, I could not resist expressing my joy and gratitude.
    Jozef Hlavaty

  • Left Outer Joining multiple tables to one source table FAILS with VLD-1511

    Hi all,
    Is it me, or is OWB unable to handle left outer joining 1 source table to multiple other tables?
    I want to load a fact table so I have 1 source table with measures. This table must be outer joined to some dimensions that have their FK in the fact table.
    The SQL statement would look like this (and is perfectly valid):
    select ...
    from input, dim1, dim2
    where input.c1 = dim1.c1(+)
    and input.c2 = dim2.c2(+);
    I put the where clause in the joiner operator and validate, but that gives me message VLD-1511: A table may be outer joined to at most one other table.
    Even splitting this up into one outer join per joiner still gives this message.
    A search and look around on the forum and on metalink shows there are related issues (like bug 3334035). Seemingly creating a view is the work-around to use.....? (ie downgrading owb to a simple gui tool) }-;
    Have other people experienced this problem of not being able to outer join one input table to multiple other tables?
    Thanks,
    Ed

    I have had some feedback from Oracle. It turns out this has to do with 2 issues. Below I have pasted the text that Support gave me:
    <---------- START QUOTE ---------->
    RESEARCH
    =========
    Bug 3437036 KEY LOOKUP DOES NOT DETECT ORA-1417 IN VALIDATE/GENERATE STEP
    Unpublished Bug 4211684 FORWARD PORT OF BUG 3437036
    shows:
    Some more development has been completed when this bug is fixed in Paris.
    The following are the details:
    1. If the join condition contains a full outer join such as
    tab1.c (+) = tab2.c (+) and tab2.c (+) = tab3.c
    then the new validations implemented for this bug do not apply since
    in OWB, full outer join triggers generation of joins in ANSI syntax.
    ANSI syntax does not have the original problem the base bug of this
    bug reported.
    2. If the join condition does not contain any full outer join condition,
    then the join is generated in Oracle join syntax, which is subject two
    several restrictions. The fix to this bug check two of the restrictions.
    3. The first restriction in Oracle syntax is that the outer join operator
    "(+)" can only directly be attached to a column name. If you attach it
    to an expression, such as the following:
    (tab1.c + 1) (+) = tab2.c
    Then there will be an ORA-936 error at the time of mapping deployment.
    For this case, I have added a validation message VLD-1512 to error out
    this situation.
    4. The second restriction in Oracle syntax is that a table can only be
    outer joined to exactly one other table.
    For example, this is an invalid join in Oracle syntax:
    tab1.c (+) = tab2.c and tab1.d (+) = tab3.d
    because tab1 is left outer joined to tab2 and tab3.
    But note that the following is still valid in Oracle syntax:
    tab1.c (+) = tab2.c and tab1.d = tab3.d (+)
    because tab1 is left outer joined to tab2 and right outer joined to tab3.
    So this latter case does not violate the restriction that "same oj" to
    more than 1 table is not allowed.
    If same oj to more than 1 table is specified in a join condition,
    VLD-1511 will be issued, and the map is made invalid.
    <---------- END QUOTE ---------->
    OWB does a partial validation, ie not all access paths are (can be) checked. A full check is only done by the database itself. So some scenarios (like checking whether multiple tables are outer joined the correct way) are not checked, and in this case are flagged with an error (even though it is actually a correct scenario).
    Seemingly this was not flagged with an error in earlier versions of OWB, so beware, OWB behaviour may change when upgrading...
    Alternative solutions are (1) using key lookups, (2) using a view with all outer joins in there, (3) using intermediate result tables between the joins.
    Hope this info helps some people prevent spending too much time on a false error message,
    Ed

  • Left outer join BO5.1universe-migrated to BOXI left outer join missing(DB2)

    Two tables are joined using left outer join in BO 5.1 universe which is using DB2 database. When we migrated this universe to BO XI R2, the same join is existing at universe level but missing at the report level .
    Before migration, query from BO 5.1 report is as follows:
    SELECT
      NUPB.TPBMCFOS.SYSTEM,
      NUDW.TDWDAGY.AGY_ACCOUNT_SOURCE,
      NUPB.TPBMCFOS.ITEMCODE_ALPHA,
      NUPB.TPBMCFOS.TRANSACTION_DATE,
      NUPB.TPBMCFOS.ITEMCODE_NUM,
      NUPB.TPBMCFOS.AGENCY_REFERENCE,
      NUPB.TPBMCFOS.POLICY_NO,
      NUPB.TPBMCFOS.SUSPENSE_DATE,
      NUPB.TPBMCFOS.SUSPENSE_TYPE,
      NUPB.TPBMCFOS.SUSPENSE_CODE,
      NUPB.TPBMCFOS.GROSS_PREMIUM,
      NUPB.TPBMCFOS.COMMISSION_AMOUNT,
      NUPB.TPBMCFOS.NETT_PREMIUM
    FROM
      NUPB.TPBMCFOS LEFT OUTER JOIN NUDW.TDWDAGY ON (NUPB.TPBMCFOS.AGENCY_REFERENCE=NUDW.TDWDAGY.AGY_ACCOUNT_REF AND NUDW.TDWDAGY.AGY_CURRENT_ROW=1)
    After migration, query from DeskI report is as follows:
    SELECT
      NUPB.TPBMCFOS.SYSTEM,
      NUDW.TDWDAGY.AGY_ACCOUNT_SOURCE,
      NUPB.TPBMCFOS.ITEMCODE_ALPHA,
      NUPB.TPBMCFOS.TRANSACTION_DATE,
      NUPB.TPBMCFOS.ITEMCODE_NUM,
      NUPB.TPBMCFOS.AGENCY_REFERENCE,
      NUPB.TPBMCFOS.POLICY_NO,
      NUPB.TPBMCFOS.SUSPENSE_DATE,
      NUPB.TPBMCFOS.SUSPENSE_TYPE,
      NUPB.TPBMCFOS.SUSPENSE_CODE,
      NUPB.TPBMCFOS.GROSS_PREMIUM,
      NUPB.TPBMCFOS.COMMISSION_AMOUNT,
      NUPB.TPBMCFOS.NETT_PREMIUM
    FROM
      NUPB.TPBMCFOS,
      NUDW.TDWDAGY
    WHERE
      ( (NUPB.TPBMCFOS.AGENCY_REFERENCE=NUDW.TDWDAGY.AGY_ACCOUNT_REF AND NUDW.TDWDAGY.AGY_CURRENT_ROW=1)  )

    I've found similar behaviour but with SQL server database (also migrating from 5.1.6 to XiR2)
    You can also add the parameter EXT_JOIN_INVERT = Yes to your parameter screen in designer
    Maybe this wil help? (it did the trick for me)
    If this doesn't work...
    Also check your appropriate db2 PRM file  for the same parameters:
    <Instal location>\BusinessObjects Enterprise 11.5\win32_x86\dataAccess\connectionServer\db2
    I'm not sure how what is used when or maybe both but it has got something to do with those 2 options(parameter screen in designer vs. PRm file on server)
    Edited by: Bob  de Beer on Aug 1, 2008 1:21 PM

  • Outer Join or Row-Level Function

    Hi ALL,
    I have a query which involves five tables T1, R1, R2, R3 and R4. T1 is a transaction table, whereas R1, R2, R3 and R4 are reference tables (Parent tables, with foreign keys defined in T1). T1 table always contains R1 and R2 referenced data. BUT T1 table may contain sometimes NULL for R3 and R4.
    Now my question is simple;
    Should i use an OUTER Join for R3 and R4 in the query? like
    <code>
    select T1.col1, R1.col2, R2.col2, R3.col2, R4.col2
    from T1, R1, R2, R3, R4
    where T1.col2 = R1.col1
    and T1.col3 = R2.col1
    and T1.col4 = R3.col1(+)
    and T1.col5 = R4.col1(+)
    </code>
    OR
    Should i use row-level functions for R3 and R4, like
    <code>
    select T1.col1, R1.col2, R2.col2,
    (Select R3.col2 from R3 where R3.col1 = T1.col4),
    (Select R4.col2 from R4 where R4.col1 = T1.col5)
    from T1, R1, R2
    where T1.col2 = R1.col1
    and T1.col3 = R2.col1
    </code>
    which approach is better and why?
    Records in T1 = 2,000,000
    Records in R1 = 1000
    Records in R2 = 300
    Records in R3 = 1800
    Records in R4 = 200
    Please note that all foreign keys are indexed, there are primary keys in all R tables
    Thanks,
    QQ.

    dwh_10g wrote:
    I have preferred to go for Outer Joins, as there might be a possibility, if data grows than there will be more row-level scans; hence slower output in future.
    If i go with a row-level scan, then there will be more usage of Hash tables (Memory), so if more memory is required and our SGA limits is crossed, then there will be more disk I/O i guess. which is a costly operation.
    QQ,
    as already explained, unfortunately it's hard to predict how the "row-level" approach is going to perform in case of increased data volume. Since it is dependent on some factors it could be faster or slower than the outer join approach.
    You shouldn't worry too much about the size of the in-memory table. You haven't mentioned your version, but since your alias is "dwh10g" is assume you're using 10g.
    In 10g the size is defined by the hidden parameter "_query_execution_cache_max_size" and set to 65536 bytes by default. In pre-10g the size is always 256 entries which might grow bigger than 64k in case you have large input/output values (e.g. large VARCHAR2 strings). Compared to potentially multiple several megabytes large sort and/or hash SQL work areas used by each open cursor this table seems to be relatively small.
    I don't think that this memory is taken from the SGA, but belongs to the PGA of the process executing the query and therefore it should not allocate SGA memory (I think even in Shared Server configuration this part should be allocated from the PGA of the shared server process).
    So in summary if your data volume increases it shouldn't have an noticeable impact on the memory usage of the "row-level" approach, and therefore this I think is negligible.
    But as a recommendation I would say, since the "row-level" approach doesn't seem to be significantly faster than the "outer join" approach and it's behaviour in future is hard to predict (e.g. it could become worse if your data pattern changes or the execution plan changes and therefore the order of the row processing changes) I would stick to the "outer-join" approach. I assume it could be more stable in terms of performance.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • 3.2, BC4J, outer joins, insert, lookup, bug

    I have a table voyage that has a foreign key to routes. This relation is not mandatory.
    I created a frame that shows the voyage. I use an outer join to show the route name if there is a route
    SELECT voyage.ID
    ,voyage.Name
    , voyage.routeID
    , route.ID
    , route.Name
    WHERE voyage.routeID = route.ID(+)
    FROM voyage, route
    This works fine for selecting rows. But when I insert a new voyage and try to commit it, I get an error message that route.ID is not allowed to be NULL.
    Any suggestions?
    TIA

    Hello Folks!
    I would like to bring this topic up again!
    We have problems using view objects with outer joins, too.
    In JDev 3.1 we finally managed to handle things a bit. All worked fine except of deleting a record! No chance here!
    So we prayed for better behaviour in JDev 3.2.2. But as it seems it's getting even worse. I just checked our application.
    Here are the results:
    - In the Business Component Tester everything works fine. No errors.
    - As generated business component data form in applet I can't insert a record. The joke is that deleting now is possible!!! The error I get is:
    "AttributeInfo: cannot insert null into..". When I remove all AttributeInfos named by the error messages all works fine. But that's no solution cause we need these information!
    thanks for any help on this.
    null

  • Outer Join logic

    The following code is an example of how to perform an outer join, in this case with ReportQuery (thanks Doug):
            ExpressionBuilder eb = new ExpressionBuilder();
            ReportQuery rq = new ReportQuery(Employee.class, eb);
            rq.addAttribute("firstName");
            rq.addAttribute("lastName");
            rq.addAttribute("areaCode", eb.anyOfAllowingNone("phoneNumbers").get("areaCode"));
            List<ReportQueryResult> results =  (List<ReportQueryResult>) session.executeQuery(rq);My question is about the logic Toplink uses to generate the outer join statement with the "(+)" in the generated sql.
    Does Toplink only generate the join statement if the same attribute is chosen in the select statement (in the above example "areaCode")?
    Along the same line of questioning, does it matter which attribute was in the get() call? So, in the above example did it have to be areaCode, or could it have been any other attribute of phoneNumber, and it still would have performed the join?
    In my case, because the selection attributes are built up dynamicly, should I add all attributes of my child class (my equivalent PhoneNumber class)?

    Thanks for your reply Doug.
    One last question, hopefully.
    I have a parent table with 2 child tables. When attempting an outer join with both, toplink does not attempt to outer join either. I understand why, sort of - as you get an error when attempting this in sqlplus with "(+)" syntax.
    I understand that you can outer join > 1 other table to a parent with ansi sql syntax:
        select dept.*,emp.*
        from dept left outer join emp
        on dept.deptno = emp.deptnoWill toplink allow > 1 child table outer join to a parent table?

  • And , or in outer join

    dear all,
    since the column of table can not be boolean value, so why and can be used in join query, why "or" can not? anybody can give some example whether "and", "or" used in outer join is correct or wrong.
    thanks,

    hai lily...
    yes i have tried this example
    in outer join,yes it is correct,if we want
    srpecific data then we can use these
    parameters ....
    hope u get it..
    bye

  • Full outer Join:ORA-01790

    Hi All,
    The issue may be silly, but we cant make it out:
        DB : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProdWe are running the below query with no issues:
    select t1.text,t2.text text2,t1.line,decode(upper(t1.text),upper(t2.text),1,0) flg
    from
       (select text,row_number() over(order by line) line
        from user_source
       where name = 'COLL_MVIEW_REFRESH_PROC_LBK'
       and replace(trim(text),chr(10)) is not null
       ) t1,
       (select text ,row_number() over(order by line) line
        from user_source
        where name = 'COLL_MVIEW_REFRESH_PROC'
        and trim(replace(text,chr(10))) is not null) t2
    where t1.line = t2.lineBut when trying for an outer join it is giving error like
    ORA-01790: expression must have same datatype as corresponding expressionOuter Join Query:
    select t1.text,t2.text,t1.line,decode(upper(t1.text),upper(t2.text),1,0) flg
    from
       (select text,row_number() over(order by line) line
        from user_source
        where name = 'COLL_MVIEW_REFRESH_PROC_LBK'
        and replace(trim(text),chr(10)) is not null
        ) t1 full outer join
        (select text ,row_number() over(order by line) line
        from user_source
        where name = 'COLL_MVIEW_REFRESH_PROC'
        and trim(replace(text,chr(10))) is not null) t2
    on( t1.line = t2.line )Any idea what is wrong here?
    Thanks,
    Jeneesh

    Not sure what is wrong with your version. It might have to do with row_number not working on an empty row (outer joined).
    How about this alternative?
    The approach is a bit different, but it uses only one access to the user_source view.
    select s.lineNo, min(s.text1) text1, min(s.text2) text2, decode(upper(min(s.text1)), upper(min(s.text2)), 1, 0) flag
    from
    (select decode(u.name, 'COLL_MVIEW_REFRESH_PROC_LBK', u.text) text1
           ,decode(u.name, 'COLL_MVIEW_REFRESH_PROC'
    , u.text) text2
           ,u.name,
            row_number() over (partition by u.name order by u.line) lineNo
    from user_source u
    where u.name in ('COLL_MVIEW_REFRESH_PROC_LBK','COLL_MVIEW_REFRESH_PROC'
    /* and u.TYPE = 'PROCEDURE' */
    and replace(trim(u.text),chr(10)) is not null
    ) s
    group by s.lineNo
    order by s.lineNo;Edited by: Sven W. on Nov 18, 2008 5:24 PM

  • How do I find missing entries in outer join table?

    Hi all,
    I am trying to find records in table1 that are missing in table2.  This is a simple process in SQL, but ABAP is giving me trouble.  I want to do this using an outer join.
    Example:
    Select table1~docnumber
    From table1
    Left Outer Join table2
    On table1docnumber = table2docnumber
    Where table2~docnumber IS NULL.  (the record is missing in table2)
    Note: ABAP gives an error and wants me to use the Having Clause, which is ok, but then ABAP wants me to use Group By, which ok, but then I still get the same syntex error.
    Any thoughts on doing this with the outer join and is null options.  I do not want to select into two internal tables and compare them.

    All,
    I am not trying to do a subquery.  Just a simple outer join where I know some records are missing in the second table.
    Here is the code:
    select eban~banfn
    into table i_delay_banfn
    from eban
    left outer join zsmt_prdelay_upd
    on eban~banfn = zsmt_prdelay_upd~banfn
    where zsmt_prdelay_upd~banfn IS NULL.
    Here is the error message:
    No fields from the right-hand table of a LEFT OUTER JOIN may appear in
    the WHERE condition: "ZSMT_PRDELAY_UPD~BANFN".
    select eban~banfn
    into table i_delay_banfn
    from eban
    left outer join zsmt_prdelay_upd
    on eban~banfn = zsmt_prdelay_upd~banfn
    having zsmt_prdelay_upd~banfn IS NULL.
    Please use code tags
    Edited by: Rob Burbank on Mar 5, 2009 12:20 PM

  • BI 7.0 Infoset - Infocube - Left outer join - query

    Hi Expert,
    A infoset contain Infocube and ODS, linked with left outer join, common fields are PO,PO item.  PO account assignment ODS have three keyfields: PO Doc.,Item,account Assignment  .
         PO  Infocube                                     <b>PO Account Assignment ODS</b>
    PO       PO item  Amt<b>PO Doc.  Item   AccAssignment         Cost object</b>
    1000    10            230  <b>1000       10        1                          CC1</b>
    1001    10            250  <b>1002       10        1                          CC1</b>
    1002    10            150  <b>1002       10        2                          CC2</b>
    in BEx result are like this:    
    1000    10            230      1     CC1
    1001    10            250      #      #
    1002    10            150      1     CC1
    1002    10            150      2     CC2 ( amount only duplicated)
    The issue was that amount gets duplicated. It only occurs if PO has more than one account assignment.
    In report, we want show like this
    1000    10            230       1       CC1
    1001    10            250       #        #
    1002    10            150       1       CC1
    1002    10            #        2       CC2
    Any suggestion or input to overcome this issue?
    Thanks,
    Saran
    Message was edited by:
            Saravanan K

    Hi,
    did you solve your problem? because I have the same issue right now: the left outer join doesn't seem to do its job.
    Let me know if you have found a solution, it would be appreciated.
    have a nice day,
    Dominic

  • BI Infoset left outer join  (NW04s)

    I created an Infoset using a left outer join for infoproviders:
    - 0FIGL_O10 (GL transaction figures - DSO )
    - 0CCA_C03 (CCA Statistical key figures - CUBE)
    DSO 0FIGL_O10 is the left table with joins on:
    - 0COSTCENTER
    - 0FISCPER
    The data set returned by Infoset appears to be based on a SQL using an
    inner join.
    This appears to be a bug.
    We are on BI 700 SP 15.

    Hi Raynald - I did a demo with few records and it works fine for me.  We are on 7, SP14.

  • FULL OUTER JOIN In InfoSet

    Hi, all
    Is it possible to make FULL OUTER JOIN in BI InfoSet?
    If no, another question - is it possible to switch base InfoProvider? I have an InfoSet with InfoCube1 and DSO1 which I can outer join. I want to outer join InfoCube1 , not DSO1 that's why I need to switch them in the InfoSet.

    Hi,
       In BI 7.0 Infoset has given chance to include an Info cube also,maximum you can include 2 info Cubes only in a infoset.
    check the below link which helps you in understanding of the join conditions so that you can apply to your scenario.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/f1/713c3b35703079e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/67/7e4b3eaf72561ee10000000a114084/content.htm
    Regards,
    Praveena.

Maybe you are looking for

  • How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000

    Post Author: ltkin CA Forum: WebIntelligence Reporting Hi, How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000 ? Regards,

  • Mpeg4 compression failed (QuickTime Error: -50)

    I was trying to compress this 3 minute long clip using "MPEG-4 Improved NTSC Small Progressive" setting but it always failed, and in the log/history i always find the following status: Failed: QuickTime Error: -50 I have tried another MPEG4 configura

  • How to parse thus XML data?

    Hi,experts: In below thread: Receiving .Net dataset with deployed proxies i asked how to create a external definition in IR base on above XML data. Now,i have created a XSD file base on the XML data.And importing it into IR successfully. <?xml versio

  • Possible to get 'Automatic' device register without NSP ?

    Hi  Anybody pleade hint me config ISE1.2 I need to do separated ssid called on-board. Once non registed device comes in, ISE get sredirect to registering portal.  I can finish self fill in device register which user need to fill in his MAC manually.

  • TextBlock does not aligns to right in DataGridTemplateColumn

    Hello guys here: I am currently running into a nasty issue. What I wanna achieve is to put two text blocks horizontally in a DataGridTemplateColumn and I wanna align the right text block text to the right. Here is my code: <DataGrid ItemsSource="{Bin