Outer join not working

Hello everybody,
I have a folder based on materialized view (Detailed folder). There is another folder which is based on a table (master folder). i have created a jooin and select option as "outer join on master folder". The join is not working properly. Am i doing asomething wrong. Discoverer version is 10.1.2 and database version is 10.2.0.3. i have been creating outer joins among folders based on tables but i am not sure about whats wrong this time??? materalized view defination is as follows:
CREATE MATERIALIZED VIEW MW
BUILD IMMEDIATE
REFRESH FORCE
START WITH SYSDATE
NEXT TRUNC(SYSDATE+1)+1/4
WITH PRIMARY KEY
AS
SELECT * FROM VIEW
Thanx for your help
Regards,
Najeeb

So, let me see if I got this...
You have a table and a materialized view. There is a join between the two, where the table is the master, and the MV is the detail. The join is set to be an outer join on master. Ultimately, you want to see the values in the MV where the join condition is NULL.
What boggles me is that you say the query runs fine in the database, but not in Disco. This could mean that there is a condition in the BA or in the worksheet. But, if that were the case, the condition should show up in the SQL generated by Disco.
It looks like the where clause is the problem. NULL is never equal to anything, so when APPROVEDBY is null, the where clause should fail and no data returned. This explains Disco's behavior, but not SQL's.
Something to try: Create a calculation in the materialized view folder of the business area like:
NVL(APPROVEDBY, -1)
I am assuming that all of your IDs are positive. Then modify the join to use the calculated column. This should convert the NULLS to values, and the report should work.

Similar Messages

  • Outer join not working when filters are applied from Prompts

    Hi,
    Without values being selected from the dashboard prompts, my outer join is working fine with all the rows and all the columns showing up( as per requirement). But as soon as I select values in the prompts, only certain rows and columns show up.
    BTW, I have 2 prompts Year and Quarter. I put Year is Prompted or is null in the criteria. It works. BUT as soon as I also put in quarter numbers, it does not work.
    Is there a workaround for this?
    Thanks,
    Dan
    Edited by: Danny on Apr 26, 2013 12:10 PM

    I just experimented by adding is null to not only the year and quarter but to the row and column too and it worked!
    Thanks,
    Dan

  • Left Outer Join Not working in BI 7.0 Infoset

    Hi All,
    I am working on BI 7.0. I have to create a report where I have to display the Target values from a target DSO against the transactional data (Operational data).
    I have a DSO where for a “subteam” value target has been set up on different KPIs.
    In the Info Cube, I have transactional data on daily basis per “subteam”. I have to show the actual and target values.
    I have created an Info Set using Target DSO and Daily operational cube, so that I should able to compare the target and actual values of KPIs, for all the “subteam” values (From DSO, irrespective of whether the data is available in cube for those sub team).
    I have used Outer Left Join in the Info set (DSO on left side), but I am unable to see the desired results. It is working just like an inner join.
    Any Idea why the Outer Left Join is not working? The DSO has only one fey field called “subteam” on which I have set outer left join.
    Regards,
    Amit

    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

  • Dynamic From statement in select query and/or outer join not working

    Dear Experts, I have a select query where the select columns are dynamic, the where condition is also dynamic. It is of the below format:
    Select (dynamic columns) INTO <wa>
    FROM a inner join b on af1 = bf1
    inner join c on af2 = cf2......
    WHERE (dynamic conditios)
    ORDER BY ( dynamic sort condition).
    Now I have to include some tables (dynamically depending on the user input) in the inner join statement which will give description for the selected fields. And these database tables may or may no be empty. So in this case, my select query will not return any data if these tables are empty. And I dont want that.
    I tried using outer join for the extra tables but it gave me a runtime error. I also tried forming the inner join statement dynamically but it was not supporting.
    Kindly give me pointers.
    Thanks

    Hey thanks for the reply, but the problem is not solved.
    I am already using  ( fileds, value) like table in my where condition and the select statement was working properly.
    the problem is that now I have to include some tables in the join statement which can be empty and so i want to use Outer join.
    But I am getting a runtime error as below:
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SYNTAX', was not
         caught in
        procedure "ZATSCSNG_RFC_READ_TABLE" "(FUNCTION)", nor was it propagated by a
         RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        The running ABAP program wanted to execute a SELECT statement whose
        WHERE condition was (partly) specified dynamically. The part that is
        specified in an internal table at runtime is compared to a field of the
        right table of an LEFT OUTER JOIN. Such comparisons are not supported by
         all database systems and are therefore not allowed.

  • Left Outer Join not working in Infoset.

    Hello Friends,
    I have two ODSes , one for planned data (zplan) and other is billing z ods (zsd_o03).
    now the situation is such that in my planned ODS  for one sold to party .
    SOLD TO        MATERRIAL CALMONT     PLANNED QUANTIY
    14315            100                06.2007           54
    14315            200                06.2007           20
    14315            300                06.2007           30
    14315            400                06.2007           10
    But in my Billing ODS iam having for Sold to 14315
    SOLD TO        MATERRIAL CALMONT     ACTUAL QUANTIY
    14315           100           06.2007                  20
    14315           200           06.2007                  30
    And my Bex ouput should be like
    SOLD TO        MATERIAL CALMONT        planned             ACTUAL QUANTIY
    14315            100                06.2007           54                                 20
    14315            200                06.2007           20                                30
    14315            300                06.2007           30                                  0
    14315            400                06.2007           10                                0
    So for this i made one Infoset and these ODses are linked by Sold_to , Materail,
    Calmonth.
    First i tried using Inner joing option , but the bottom two lines were not ciming , so used left outer join , and activated and recreated the query but still its showiong me the output same as inner join .. i.e
    14315            100                06.2007           54                                 20
    14315            200                06.2007           20                                30
    So i checked by writing a ABAP code in Se38 , but there its showing me the correct result ..
    So please anybody help me out because iam thinking that infoset is the right way to do this kind of reporting , or esle shall i make one ODS and populate it through this ABAP code..
    Thanks in advance.

    Hi , can anybody help me in this regard..
    Thanks ..

  • Merging two complemental result sets... or OUTER JOINs not working?

    Dear experts!
    Again I have a very difficult problem for which I ask Your help, but this time I am better prepared than last time and can deliver sample data of my (hopefully not too much) simplified example:
    create table Subjects(
    pk_id          number          not null primary key,
    title          varchar2(128)
    create table People(
    pk_id          number          not null primary key,
    name          varchar2(128)
    create table Results(
    pk_id          number          not null primary key,
    fk_subjects_id     number,
    fk_people_id     number,
    result          number
    insert into Subjects(pk_id, title) values (1, 'Choosing a recipe')
    insert into Subjects(pk_id, title) values (2, 'Shopping ingredients')
    insert into Subjects(pk_id, title) values (3, 'Preparations')
    insert into Subjects(pk_id, title) values (4, 'Cooking for beginners')
    insert into Subjects(pk_id, title) values (5, 'Eating for pros')
    insert into Subjects(pk_id, title) values (6, 'Dishwashing for everyone')
    insert into Subjects(pk_id, title) values (7, 'Digesting for experts')
    insert into Subjects(pk_id, title) values (8, 'Becoming hungry again...')
    insert into Subjects(pk_id, title) values (9, 'Redo from start')
    insert into People(pk_id, name) values (1, 'Hank')
    insert into People(pk_id, name) values (2, 'Cloe')
    insert into People(pk_id, name) values (3, 'Mary')
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (1, 1, 1, 2)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (2, 2, 1, 4)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (3, 3, 1, 3)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (4, 9, 1, 5)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (5, 1, 2, 4)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (6, 2, 2, 1)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (7, 3, 2, 5)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (8, 4, 2, 2)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (9, 5, 2, 3)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (10, 6, 2, 2)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (11, 7, 2, 1)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (12, 4, 3, 3)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (13, 5, 3, 5)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (14, 7, 3, 1)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (15, 8, 3, 5)
    insert into Results(pk_id, fk_subjects_id, fk_people_id, result) values (16, 9, 3, 1)
    Please imagine this as an university for amateur cooks. Now I want to present them their performance record/"scorecard", for every student, only with her or his marks. On this performance record there should be a list of all 9 subjects possible to pass, and where students got a result, that result should be filled in. I thought that should be possible to achieve with something like this:
    SELECT PEOPLE.NAME, SUBJECTS.TITLE, RESULTS.RESULT FROM RESULTS
    JOIN PEOPLE ON PEOPLE.PK_ID = RESULTS.FK_PEOPLE_ID
    JOIN SUBJECTS ON SUBJECTS.PK_ID = RESULTS.FK_SUBJECTS_ID
    WHERE RESULTS.FK_PEOPLE_ID = 2
    But also using (LEFT|RIGHT|FULL) OUTER JOINs here does not help me to get what I want, I always only get
    NAME TITLE RESULT
    Cloe Choosing a recipe 4
    Cloe Shopping ingredients 1
    Cloe Preparations 5
    Cloe Cooking for beginners 2
    Cloe Eating for pros 3
    Cloe Dishwashing for everyone 2
    Cloe Digesting for experts 1
    But I want:
    NAME TITLE RESULT
    Cloe Choosing a recipe 4
    Cloe Shopping ingredients 1
    Cloe Preparations 5
    Cloe Cooking for beginners 2
    Cloe Eating for pros 3
    Cloe Dishwashing for everyone 2
    Cloe Digesting for experts 1
    Cloe Becoming hungry again...
    Cloe Redo from start
    Without having to fill in empty rows for all students which did not take all exams yet.
    Is it possible? If so, how?
    Thank You very much in advance and Happy Easter to everyone! :-)
    With kind regards,
    Chriss
    Edited by: user9355711 on 01.04.2010 07:01
    Edited by: user9355711 on 01.04.2010 07:28
    Edited by: user9355711 on 01.04.2010 07:29

    Also;
    var n number
    exec :n := 2;
    PL/SQL procedure successfully completed
    n
    2
    select ppl.name, sub.title, res.result
      from subjects sub, people ppl, results res
    where sub.pk_id = res.fk_subjects_id(+)
       and ppl.pk_id = :n
       and res.fk_people_id(+) = :n
    order by sub.title;
    NAME       TITLE                         RESULT
    Cloe       Becoming hungry again... 
    Cloe       Choosing a recipe                  4
    Cloe       Cooking for beginners              2
    Cloe       Digesting for experts              1
    Cloe       Dishwashing for everyone           2
    Cloe       Eating for pros                    3
    Cloe       Preparations                       5
    Cloe       Redo from start          
    Cloe       Shopping ingredients               1

  • LEFT OUTER JOIN not working as expected

    I'm testing a query from the portal. I've got two inputs:
    products
    {"ProductKey":1,"ProductAlternateKey":"abc","Color":"Red"},
    {"ProductKey":2,"ProductAlternateKey":"def","Color":"Blue"},
    {"ProductKey":3,"ProductAlternateKey":"ghi","Color":"Blue"}
    And temperatures:
    {"DeviceId":1,"Temperature":99},
    {"DeviceId":2,"Temperature":90},
    {"DeviceId":2,"Temperature":99},
    {"DeviceId":3,"Temperature":50},
    {"DeviceId":4,"Temperature":32}
    When I test a query with an (inner) join, I get two rows, one for Red and one for Blue as expected. However, when I change to a LEFT OUTER JOIN, I would expect to get three rows... one for Red, one for Blue, and one for NULL color. However, I only get one
    row with a NULL color. Here's the query. Is this a bug or am I misunderstanding?
    SELECT DateAdd(second,-5,System.TimeStamp) as WinStartTime
    , system.TimeStamp as WinEndTime
    , b.Color
    , Avg(r.Temperature) as AvgTemperature
    , Count(*) as EventCount
    FROM temperatures r
    LEFT OUTER JOIN products b ON r.DeviceId = b.ProductKey and DATEDIFF(hour,r,b) BETWEEN -6 AND 6
    GROUP BY TumblingWindow(second, 5), b.Color
    (Please excuse the contrived example, the lack of timestamps, and the 12 hour window... just testing.)
    http://artisconsulting.com/Blogs/GregGalloway

    Hi Greg,
    Thank you for raising this issue.
    We have deployed a fix today that corrects LEFT OUTER JOIN behavior on the in-browser query testing experience.
    Can you please confirm that the above query and input sources work for you?
    Thanks!
    Ziv.

  • Macbook Pro 2011 DVI HDMI out does not work with TV when the power cable is connected

    My Macbook Pro (Early 2011) DVI HDMI out does not work with TV when the power cable is connected. If get the blue screen and then can use the macbook but nothing is displayed on the TV. If i go into display I can see that there are two screens but nothing displayed on the TV. If i take the power cable out at this point the TV shows the second desktop as expected. If i then reconnect the cable, the screen flickers, as though it is being affected by the power cable, and the screen goes blank on the TV. Only if i remove the DVI cable do i get the blue screen again. If i remove the power cable and reconnect it will do it every single time, so i cannot see it being a TV issue or a minor glitch.
    I have had this working previously but at the minute it seems to not be playing ball....any thoughts
    Thanks
    Dan

    BUMP
    Any ideas?

  • Satellite 1800-100: video-out does not work

    He,
    I just installed windows XP on my old Satellite 1800-100, but now my video-out does not work anymore. So I just downloaded the latest driver, but there's no way I can get it installed. According to Windows the new driver isn't newer, so it won't let me update it. And when i try to unistall the display driver, I have to reboot before it takes effect, and wile rebooting it automaticly installs the standard driver again.
    Can anybody help me?
    Greets,
    Daan

    Hi
    Do you mean TV- out port or monitor port? As far as I know this unit is preinstalled with WXP Home and all drivers can be also used for WXP Pro.
    Did you preinstall your own OS (non recovery image)?

  • DVI video out suddenly not working.

    That's basically it. I have a 23-inch Cinema HD Display at home and at the the office. Suddenly the video out is not working with either of them. The displays control panel lists the external display, so the system is detecting the connected display.
    There is nothing wrong with the displays. I connected an old PowerBook and they light up fine. With my MBP, the power light lights, but nothing is displayed on the Screen.

    there's a somewhat similar thread "external monitor stopped working" with no answers
    my 17" Studio display works as 2nd mon on other computers
    my dvi out does work with a vga monitor and adapter, of course :))
    i'm using the dvi to adc adapter -- could this be involved somehow?
    my laptop display goes blue when i plug in the external monitor as it should, but the 2nd monitor never wakes up, turns on, etc.

  • Check out is not working in jdevloper10g (Subverion10.1.3.41.57 )

    Check out is not working in jdevloper10g (Subverion10.1.3.41.57 )

    Check out is not working in jdevloper10g (Subverion10.1.3.41.57 )

  • System.out.println not working in Tomcat-4.1.x

    System.out.println not working in Tomcat-4.1.24. Any settings has to be enabled??? I am using tomcat for Solaris

    I think u can use ServletContext.log() to output info instased.

  • I have Iphone4 and my Iphone wifi button greyed out mean not working, Please suggest what need to do.

    I have Iphone4 and my Iphone wifi button grayed out mean not working, Please suggest what need to do and i am using ios 6.

    Please ask your question

  • Outer join doesn work

    The prob with this query is, it has to list the pono for grnno,which contains null value,but outer join doesn work on this, and it list values only for grnno that contains value please help to solve this prob
    SELECT pv.vendor_name, pv.segment1 vendorid, ph.segment1 pono, pl.line_num,
    ph.creation_date po_date, pl.quantity orderqty,
    pll.quantity_received, pl.unit_price, rcv.receipt_num grn_no,
    rct.creation_date item_recd_date, rct.quantity, ph.currency_code,
    item.segment1 itemcode, pl.item_description description,
    ph.attribute1 po_type
    FROM po_headers_all ph,
    po_lines_all pl,
    po_vendors pv,
    po_line_locations_all pll,
    rcv_shipment_headers rcv,
    rcv_transactions rct,
    mtl_system_items item
    WHERE item.inventory_item_id = pl.item_id
    AND item.organization_id = pl.org_id
    AND ph.authorization_status IN ('APPROVED')
    AND NVL (ph.cancel_flag, 'N') = 'N'
    AND NVL (pl.cancel_flag, 'N') = 'N'
    AND pl.po_header_id = pll.po_header_id
    AND pl.po_line_id = pll.po_line_id
    AND pl.org_id = pll.org_id
    AND rcv.shipment_header_id = rct.shipment_header_id
    AND pl.po_header_id = rct.po_header_id
    AND rct.po_line_id = pl.po_line_id(+)
    AND pl.po_header_id = ph.po_header_id
    AND pv.vendor_id = ph.vendor_id(+)
    AND TRUNC (ph.creation_date) >= '06-MAY-2006'
    AND TRUNC (ph.creation_date) <= '29-MAY-2006'
    AND rct.transaction_type = 'RECEIVE'
    ORDER BY pono

    This is one that always confuses me - do you need to outer join all references to the table? ie :
      1  select d.deptno,d.dname
      2  ,e.empno,e.ename
      3  from dept d,emp e
      4  where d.deptno = e.deptno(+)
      5  and d.dname like '%S%'
      6* and e.ename like '%A%'
    SQL> /
        DEPTNO DNAME               EMPNO ENAME
            30 SALES                7499 ALLEN
            30 SALES                7521 WARD
            30 SALES                7654 MARTIN
            30 SALES                7698 BLAKE
            20 RESEARCH             7876 ADAMS
            30 SALES                7900 JAMES
    6 rows selected.
    SQL> edit
    Wrote file afiedt.buf
      1  select d.deptno,d.dname
      2  ,e.empno,e.ename
      3  from dept d,emp e
      4  where d.deptno = e.deptno(+)
      5  and d.dname like '%S%'
      6* and e.ename(+) like '%A%'
    SQL> /
        DEPTNO DNAME               EMPNO ENAME
            20 RESEARCH             7876 ADAMS
            30 SALES                7654 MARTIN
            30 SALES                7900 JAMES
            30 SALES                7521 WARD
            30 SALES                7499 ALLEN
            30 SALES                7698 BLAKE
            40 OPERATIONS
            60 TEST
            70 TEST
    9 rows selected.

  • ORA-30563, Outer Join not allowed in select list

    I can not find any information about this error message that I am getting.
    I have just upgraded my Oracle database from Version 7.3 to Version 8.1.7, a stored procedure that was written in v7.3 has outer joins in the select statement.
    when trying to run this proc in version 8 I get this meesage.(ORA-30563, Outer Join not allowed in select list)
    code ex:
    Select alt.id
    decode(alt.advise, NULL, NULL, AA.act_yr(+))||'-'||AA.act_per(+)||'-'||AA.Acc_per_no(+)) as advise_no
    from alt, AA;
    Is there any information about this message anywhere? or does anybody know if this is a known issue with oracle ver 8.1.7?
    Thanks
    CJ

    It appears to have been a bug in 7.x
    From a metalink note on bugs fixed in 8i (doc 132632.1)
    974742 Oracle does not report an error if (+) is specified in select-list. The OUTER JOIN operator (+) is only valid in WHERE clause predicates. As this is not flagged as an error the query can give unexpected results. The correct action to avoid this problem is to fix the query.
    Ken

Maybe you are looking for

  • Multiple iPods, One Computer - Question

    I currently have a Classic 160GB and I'm looking into getting a Nano or iTouch soon. I have the ability to use more than one computer or more than one account to sync them both that way, but I was wondering about a different method not mentioned in t

  • Error in loading the multiple file loading

    hi, i am following this blog to load the multiple files into rdbms table. http://www.odigurus.com/2011/05/multiple-files-single-target-table.html the problem is that when i assign the source Flat file Datastore Model Resource Name #Project_Name.FILE_

  • Detecting the SAVE of the data to the planning buffer

    Hi, When the user has saved the planning buffer data after executing the planning function that has the Exit FM, how can I detect that the data from the planning buffer has been saved from my Exit FM? Is there a way to detect that he user has clicked

  • Pic Zoom when hover over it??

    Can anyone help me? I need a script or a way to make a photo zoom or enlarge when mouse hovers over it. Is it done in dreamweaver or flash?? PLEASE HELP An example can be found here http://www.robcousens.com.au/index.php?page=cat_index&cat=112 Cheers

  • IWeb '08 Creating Popups

    I am designing my website for the first time using iweb '08. I don't like their slideshow options. I basically resized images to thumbnails on my page and I want to create an action so when you click on a thumbnail, the selected image pop-ups. Is the