Outer Joins in Oracle 9i

Post Author: wtfinc
CA Forum: Data Connectivity and SQL
After upgrading to Oracle 9i, the SQL queries generated by Crystal Reports XI contain a syntax errors when performing Outer Joins.  The particular error returned by Oracle is "Old Style Outer Join can not be used with ANSI Joins".  Does anyone know a work around short of changing the datbase connection to a command and rewriting the report?

Post Author: Jagan
CA Forum: Data Connectivity and SQL
If you choose SQL Query from Crystal's Database menu, does the SQL have a combination of old and new syntax?

Similar Messages

  • How to use OUTER JOIN in Oracle Answers Filters?

    Hi, I need to have a filter on an 'Oracle Answers' report.
    The query from the NQQuery.log appears as below. (I have simplified the SELECT clause here for easy reading)
    SELECT t692.enquiry_business_route AS c1,
    t692.enquiry_id AS c11, t913.YEAR AS c12,
    t913.full_date AS c13, t666.surname AS c14,
    t666.post_code AS c15, t855.company_name AS c16,
    t983.notes AS c30
    FROM
    mkt_dw_enev_enhi_dim t983,
    mkt_dw_key_partner_dim t855,
    mkt_dw_event_type_dim t821,
    mkt_dw_customer_dim t666,
    mkt_dw_time_dim t913,
    mkt_dw_enquiry_event_fact t692
    WHERE (
    t692.enquiry_id = t983.enqu_id
    AND t666.customer_dim_key = t692.customer_dim_key
    AND t692.event_date_time_key = t913.time_dim_key
    AND TRUNC(t983.event_date)= t913.FULL_DATE
    AND t692.event_type = t821.event_type_dim_key
    AND t692.key_partner_dim_key = t855.key_partner_dim_key
    AND t821.event_type_category = 'RECEIVE_FEE'
    AND t913.YEAR = 2009
    and t692.enquiry_id = 535986
    For the following two lines I would like to have the OUTER JOIN.
    AND t692.event_type = t821.event_type_dim_key(+)
    AND t821.event_type_category(+) = 'RECEIVE_FEE' (THIS IS THE FILTER CONDITION, AT THE MOMENT IT DOESN'T WORK WITH OUTER JOIN SYMBOL)
    Please could you let me know the best way of achieving the above.
    Thanks
    Srikanth

    In the BMM layer in the join condition you will be able to specify the join to be (left, right or full outer join).
    You can even add the required table in the LTS(logical table source) and also specify a left, right or full outer join there as well.
    There is an interesting work around as mentioned in the below blog to get to the Outer join results with out changing anything in rpd but in Answers.
    http://obiee101.blogspot.com/2008/11/obiee-outerjoin-workaround.html
    Hope it helps
    Thanks
    prash

  • Multiple Outer join in ORACLE 8.1.6

    Hi ,
    Can anybody suggest me how can i use multiple outer join on one table. I'm using ORACLE 8.1.6.
    I know this version of oracle doesnt support this. But is there anmy other wa\y I can achieve this.
    Thanks amd Regards
    Deependra

    Tricky question - but I went through this about 3 months ago, and found a good thread on here that explains it pretty well.
    check out Re: Outer join a table with two diff table
    You basically will have to create an inline view with one outer join in there, and then a second outer join on the outside. Read through the posts in that thread and it should help!

  • Outer join with Oracle Syntax

    Hi, i'm new in oracle and ihave been working this query for reports for about 2 weeks, plz take a look on my query
    SELECT mmt.transaction_date "Transaction Date",
                msib.segment1 "Item",
                gcc.segment1||'-'||gcc.segment2||'-'||gcc.segment3||'-'||gcc.segment4||'-'||gcc.segment5||'-'||gcc.segment6||'-'||(nvl(gcc.segment7,'000000')) "account",
                (CASE mttype.transaction_type_name
                WHEN 'Average cost update' THEN
              ((nvl(mmt.new_cost,0) - nvl(mmt.prior_cost,0)) * nvl(mmt.quantity_adjusted,0)) + nvl(mmt.variance_amount,0)
                ELSE
                 (mmt.Primary_quantity * nvl(mmt.actual_cost, 0) + nvl(mmt.variance_amount, 0))
               END) "Transaction Value",
                mttype.description "Transaction Type",
                mmt.subinventory_code "Subinventory",
                ood.organization_code "Org",
                msib.Primary_UOM_Code "UOM",
                mmt.Primary_Quantity "Primary Quantity",
                mtr.description "Reason",
                mmt.transaction_reference "Reference"
    FROM mtl_material_transactions mmt,
             mtl_system_items_b msib,
             mtl_transaction_accounts mta,
             gl_code_combinations gcc,
             mtl_transaction_types mttype,
             Org_Organization_Definitions ood,
             mtl_transaction_reasons mtr
    WHERE mmt.transaction_date >= :P_DATE_FROM
               and mmt.transaction_date  < :P_DATE_TO +1
               and mmt.organization_id = :P_ORGANIZATION
               and msib.organization_ID = mmt.organization_ID 
               and msib.inventory_item_id=mmt.inventory_item_id
               and mta.transaction_id=mmt.transaction_id
               and gcc.code_combination_id = mta.reference_account
               and mttype.transaction_type_id=mmt.transaction_type_id
               and mmt.reason_id=mtr.reason_id(+)
               and ood.organization_id=mmt.organization_id
               and mttype.transaction_type_id = :P_TRANSACTION_TYPE
               and msib.segment1 = :P_ITEM
               AND gcc.segment2 = :P_ACCOUNTthe null values is on the mtl_material_transactions table, which is reason_id, subinventory_code, and transaction_reference
    the desired out put would be to show all the record on mtl_material_transactions with the null values
    so, did i put the right symbol for the outer join ??
    btw
    i have tried put the (+) on various places but it still no good, and i'm really at a loss

    user11174063 wrote:
    Hi, i'm new in oracle and ihave been working this query for reports for about 2 weeks, plz take a look on my query
    SELECT mmt.transaction_date "Transaction Date",
    msib.segment1 "Item",
    gcc.segment1||'-'||gcc.segment2||'-'||gcc.segment3||'-'||gcc.segment4||'-'||gcc.segment5||'-'||gcc.segment6||'-'||(nvl(gcc.segment7,'000000')) "account",
    (CASE mttype.transaction_type_name
    WHEN 'Average cost update' THEN
    ((nvl(mmt.new_cost,0) - nvl(mmt.prior_cost,0)) * nvl(mmt.quantity_adjusted,0)) + nvl(mmt.variance_amount,0)
    ELSE
    (mmt.Primary_quantity * nvl(mmt.actual_cost, 0) + nvl(mmt.variance_amount, 0))
    END) "Transaction Value",
    mttype.description "Transaction Type",
    mmt.subinventory_code "Subinventory",
    ood.organization_code "Org",
    msib.Primary_UOM_Code "UOM",
    mmt.Primary_Quantity "Primary Quantity",
    mtr.description "Reason",
    mmt.transaction_reference "Reference"
    FROM mtl_material_transactions mmt,
    mtl_system_items_b msib,
    mtl_transaction_accounts mta,
    gl_code_combinations gcc,
    mtl_transaction_types mttype,
    Org_Organization_Definitions ood,
    mtl_transaction_reasons mtr
    WHERE mmt.transaction_date >= :P_DATE_FROM
    and mmt.transaction_date  < :P_DATE_TO +1
    and mmt.organization_id = :P_ORGANIZATION
    and msib.organization_ID = mmt.organization_ID 
    and msib.inventory_item_id=mmt.inventory_item_id
    and mta.transaction_id=mmt.transaction_id
    and gcc.code_combination_id = mta.reference_account
    and mttype.transaction_type_id=mmt.transaction_type_id
    and mmt.reason_id=mtr.reason_id(+)
    and ood.organization_id=mmt.organization_id
    and mttype.transaction_type_id = :P_TRANSACTION_TYPE
    and msib.segment1 = :P_ITEM
    AND gcc.segment2 = :P_ACCOUNTthe null values is on the mtl_material_transactions table, which is reason_id, subinventory_code, and transaction_reference
    the desired out put would be to show all the record on mtl_material_transactions with the null values
    so, did i put the right symbol for the outer join ??
    btw
    i have tried put the (+) on various places but it still no good, and i'm really at a losshttp://www.lmgtfy.com/?q=oracle+outer+join+example

  • Outer join syntax - oracle 8i

    Here is an Oracle 8i issue I've run into ....
    I am trying to create a table that contains a record for each hour of the day (even if count is 0). I have a problem when I try a right outer join using the following syntax:
    SELECT MDT.date_field, COUNT(*)
    FROM MASTER_DATE_TABLE MDT, hsa_tgt.PICIS_OR POR
    WHERE MDT.date_field = TO_CHAR(POR.OR_IN_DTTM,'YYYYMMDDHH24') (+)
    AND TO_DATE(MDT.date_field,'YYYYMMDDHH24') >= '01-Jan-2006'
    AND TO_DATE(MDT.date_field,'YYYYMMDDHH24') <= '31-Jan-2006'
    GROUP BY MDT.date_field;
    The problem 'SQL code no properly ended' only occurs if I use the TO_CHAR function (or any function for that matter) on the outer join line.
    Is there a workaround? I did manage to create a temporary table and then successfully do an outer join in order to bypass having the to_char function in the join statement.
    Maybe a union?
    TIA

    I had to put it in a subquery? (if that's what it's called)
    SELECT a1.date_field DateAndHour, b1.OR_date, NVL(b1.record_count,0)
    FROM  MASTER_DATE_TABLE a1,
                  (SELECT TO_CHAR(b.OR_IN_DTTM,'YYYYMMDDHH24') OR_date, COUNT(*) record_count
                FROM hsa_tgt.PICIS_OR b
                GROUP BY TO_CHAR(b.OR_IN_DTTM,'YYYYMMDDHH24')) b1
    WHERE a1.date_field  = b1.OR_date (+)
    GROUP BY a1.date_field, b1.OR_date, b1.record_count
    HAVING (TO_DATE(a1.date_field,'YYYYMMDDHH24') BETWEEN '01-Jan-2006' AND '31-Jan-2006')
    ORDER BY a1.date_field;

  • Help with outer joins in Oracle!!

    so far this is what i've come up with and the code below does not work. Can anyone please help me on how the sytanx of left joins and how to use multiple left joins in a single query in oracle?
    SELECT a.*, b.Position_CD, c.Skill_CD, d.Team_Name, d.Team_Country, d.Club, e.Structure_Name
    FROM Roster a, Roster_position b, roster_skill c, Team d, Team_Structure e
    where (a.Roster_ID = ((b.Roster_ID= c.Roster_Id(+)) b.roster_id(+)).......
    I dont' know how to add more left joins!
    Here is the query I'm trying to duplicate (which is a query from Ms Access databaase which works fine).
    SELECT a.*, b.Position_CD, c.Skill_CD, d.Team_Name, d.Team_Country, d.Club, e.Structure_Name
    from ((Roster a LEFT JOIN (Roster_Position b LEFT JOIN Roster_Skill c ON b.Roster_ID=c.Roster_ID) ON a.Roster_ID=b.Roster_ID) LEFT JOIN Team d ON a.Team_CD=d.Team_CD) LEFT JOIN Team_Structure e ON a.Team_Structure_CD=e.Team_Structure_CD
    ORDER BY a.Roster_Id;
    Any help or comments are greatly appreciated

    First,
    I am not one of the leading SQL brains here...but I'm taking a stab, nonetheless.
    Second,
    Here's my best guess - and it seems to me that it should work as there are not two outer joins between any two tables. I hope I decoded your joins correctly - quite a mess that Access syntax!
    SELECT a.*, b.position_cd, c.skill_cd, d.team_name, d.team_country, d.club, e.structure_name
    FROM ROSTER a, ROSTER_POSITION b, ROSTER_SKILL c, TEAM d, TEAM_STRUCTURE e
    WHERE a.roster_id = b.roster_id(+)
    AND b.roster_id = c.roster_id(+)
    AND a.team_cd = d.team_cd(+)
    AND a.team_structure = e.team_structure(+);Third,
    As an architect-dude, it seems to me that you have a serious
    modeling problem to need so many outer joins in such a basic
    grab of data. In any scale other than minute, the performance
    of this model will suffer dramatically. Specifically, why can't
    ROSTER have an equijoin with TEAM and with TEAM_STRUCTURE - as they
    appear to be lookup tables...
    Good Luck
    (I'm certain you'll get better SQL from the others),
    Michael O'Neill
    Publisher of the PigiWiki
    clever-idea.com

  • Multiple LEFT OUTER JOIN on Oracle 8i

    Hi,
    I have to convert some stored procedure from Sql Server to Oracle 8i where I have multiple LEFT OUTER JOIN on a table. Because Oracle 8i accept only one outer join on a table how can I convert this:
    select a.id, b.id
    from test as a LEFT JOIN test1 b ON a.id(+)=b.id
    and c.display(+)=b.display
    and c.name(+)='Done';
    Thanks.

    Rewrite as:
    select a.id, b.id
    from test, test1 b
    WHERE a.id(+)=b.id
    and a.display(+)=b.display
    and a.name(+)='Done';
    Though I would lose the (+) in a.name(+) = 'Done' unless you want every name.

  • Left Outer Joins in Oracle 9

    Hello everybody, I am kinda new to SQL.
    There is only one Primary key for our database. For example 'ID'. Somebody had this code in the WHERE clause code before I started working on this. Do we really need to use the LEFT OUTER JOIN (+) in order to bring all the records. If I remove the join the number of records are reduced to a 1/6th of the original (with the joins). Please help me
    EMPLOYEE.ID = ADDRESS.ID (+) AND
    EMPLOYEE.ID = PAYROLL.ID (+) AND
    EMPLOYEE.ID = USERS.ID (+) AND
    EMPLOYEE.ID = DEPARTMENT.ID (+)

    If you want a row in the result for every row in the employee table, whether there is a matching row in the address, payroll, users, or department table, then yes, you need the outer join. If you only want results where there are matching rows in each of the detail tables, then you don't need the outer joins.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Can anyone tell me WHY Oracle won't allow sub-queries in outer joins?

    Hi,
    I've recently been tasked with converting a series of InterBase dbs to Oracle.
    Many of the queries in the InterBase dbs use sub-queries in outer joins. Oracle won't countenance this (01799 - a column may not be outer-joined to a subquery).
    I can get around it using functions but WHY won't Oracle allow this?
    SQL Server allows it, InterBase allows it (I don't know about ANSI SQL) but it seems to be a common enough technique...
    I'm just curious (and also a little frustrated!).
    Thanks in advance,,,

    Hi,
    >>Oracle treat an empty string as a NULL
    Well, you same answer your question. Because it is empty
    SGMS@ORACLE10> create table tab (cod number, name varchar2(1));
    Table created.
    SGMS@ORACLE10> insert into tab values (1,'');
    1 row created.
    SGMS@ORACLE10> insert into tab values (2,' ');
    1 row created.
    SGMS@ORACLE10> commit;
    SGMS@ORACLE10> select cod,dump(name) from tab;
           COD DUMP(NAME)
             1 NULL
             2 Typ=1 Len=1: 32
    SGMS@ORACLE10> select * from tab where name is null;
           COD NAME
             1Cheers
    If you talking about language tools, for example PHP treat empty string <> of NULL values. e.g: functions like is_empty() and is_null()
    Message was edited by:
    Legatti

  • Outer Join with an 'OR'

    I have a very complicated query to construct that requires the use of 'AND', 'OR', and Outer Joins. Oracle's 9i documentation says you can't use an outer join with an 'OR'.
    Can you suggest how I may return the correct records under the following conditions. There are 3 tables to join. Table A, Table B, and Table C. Tables A & B join with an = to common fields. The problem is with Table C.
    The way the application was designed, it has to track a parent and child relationship. As such, the field to relate may exist in 1 of 2 fields. Let's see if I can draw it out for you.
    Table A - Record 1
    (ID = 1)
    Table B - Record 1
    (ID =1 [this relates to Table A.ID]
    PID = 12345
    CID = 67899
    Site = A)
    Table C - Record 1
    (PID = 12345 [this relates to Table B.PID]
    CID = 67899
    Site = A)
    Table C - Record 2
    (PID = 67899 [This relates to Table B.CID]
    CID = 12345
    Site = A)
    Now, I need to relate Table A to Table B where A.ID = B.ID AND
    ((B.PID = C.PID AND B.CID = C.CID)
    OR
    (B.CID = C.PID AND B.PID = C.CID))
    AND
    B.SITE = C.SITE
    There may or may NOT be related records in Table C. That's the problem. This is where I need the outer join to get the all the records of the 1st two joins and only those that apply from the last join.
    Your help will be greatly appreciated.

    I'd create two queries, a join from b to c in each of those manners and then UNION ALL the results together.
    drop table junk_a;
    create table junk_a (
      id number );
    drop table junk_b;
    create table junk_b (
      id number,
      pid number,
      cid number,
      site varchar2(80) );
    drop table junk_c;
    create table junk_c (
      pid  number,
      cid  number,
      site  varchar2(80) );
    insert into junk_a values (1);
    insert into junk_b values (1, 12345, 67899, 'A');
    insert into junk_c values (12345, 67899, 'A');
    insert into junk_c values (67899, 12345, 'A');
    commit;
    SELECT b.*,
           c.site AS site_c
      FROM junk_b b,
           junk_c c
    WHERE c.pid(+) = b.pid
       AND c.cid(+) = b.cid
    UNION ALL
    SELECT b.*,
           c.site AS site_c
      FROM junk_b b,
           junk_c c
    WHERE c.cid(+) = b.pid
       AND c.pid(+) = b.cid;
    SELECT a.id,
           bc.pid,
           bc.cid,
           bc.site,
           bc.site_c
      FROM junk_a  a,
    SELECT b.*,
           c.site AS site_c
      FROM junk_b b,
           junk_c c
    WHERE c.pid(+) = b.pid
       AND c.cid(+) = b.cid
    UNION ALL
    SELECT b.*,
           c.site AS site_c
      FROM junk_b b,
           junk_c c
    WHERE c.cid(+) = b.pid
       AND c.pid(+) = b.cid
           )  bc
    WHERE bc.id(+) = a.id;

  • Outer join on query with OR clause

    hi all, i am having problem outerjoining a query with or clause
    here is my data
    WITH table1 AS
    SELECT  'test' txt1, 'pak' txt2, 'ced' txt3, 'su' txt4 FROM dual UNION ALL
    SELECT  null txt1, 'pak' txt2, 'ced2' txt3, 'su2' txt4 FROM dual UNION ALL
    SELECT  null txt1, NULL txt2, 'ced3' txt3, 'su3' txt4 FROM dual UNION ALL
    SELECT  null txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
    SELECT  'text5' txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
    SELECT  null txt1, NULL txt2, null txt3, null txt4 FROM dual
    ,table2 AS
    SELECT 111 pid, 'test' txt1, 'pak4' txt2, 'ced' txt3, 'su' txt4 FROM dual UNION ALL
    SELECT 222 pid, 'test1' txt1, 'pak' txt2, 'ced2' txt3, 'su2' txt4 FROM dual UNION ALL
    SELECT 333 pid, 'test2' txt1, 'pak3' txt2, 'ced3' txt3, 'su4' txt4 FROM dual UNION ALL
      SELECT 444 pid, 'test2' txt1, 'pak3' txt2, 'ced4' txt3, 'su3' txt4 FROM dual
    SELECT b.pid, a.*
    from table1 a, table2 b
    WHERE (a.txt1 = b.txt1 OR
           a.txt1 IS NULL AND a.txt2=b.txt2 OR
           Nvl(a.txt2, a.txt1) IS NULL AND a.txt3 = b.txt3 OR
           Nvl(a.txt2, a.txt1) IS NULL  AND a.txt3 IS NULL AND a.txt4 = b.txt4
           ) as you can see i am joining table1 and table 2. i am joining with txt1, if txt1 is null then join by txt2, if null then join by txt3 and so on.
    the code above product this output
    PID     TXT1     TXT2     TXT3     TXT4
    ===     ====     ===   ==== ====
    111     test     pak      ced     su
    222             pak      ced2     su2
    333                     ced3     su3
    444                          su3this output is partially correct. only 4 rows were display and two was left out
    SELECT  'text5' txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
    SELECT  null txt1, NULL txt2, null txt3, null txt4 FROM dual i tried using outer join but oracle complain that i cannot use outerjoin with OR clause.
    can someone help modify my query to display the output below ?
    PID     TXT1     TXT2     TXT3     TXT4
    ===    ====      ===   ====  ====
    111     test     pak      ced     su
    222             pak      ced2     su2
    333                     ced3     su3
    444                          su3
    NULL  NULL   NULL    NULL   NULL
         test5

    Not sure you can do it with the Oracle style outer joins, but wioth ANSI style joins it is simple, actually exactly as you had it.
    SQL> set null null;
    SQL> WITH table1 AS (
      2   SELECT  'test' txt1, 'pak' txt2, 'ced' txt3, 'su' txt4 FROM dual UNION ALL
      3   SELECT  null txt1, 'pak' txt2, 'ced2' txt3, 'su2' txt4 FROM dual UNION ALL
      4   SELECT  null txt1, NULL txt2, 'ced3' txt3, 'su3' txt4 FROM dual UNION ALL
      5   SELECT  null txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
      6   SELECT  'text5' txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
      7   SELECT  null txt1, NULL txt2, null txt3, null txt4 FROM dual),
      8  table2 AS (
      9   SELECT 111 pid, 'test' txt1, 'pak4' txt2, 'ced' txt3, 'su' txt4 FROM dual UNION ALL
    10   SELECT 222 pid, 'test1' txt1, 'pak' txt2, 'ced2' txt3, 'su2' txt4 FROM dual UNION ALL
    11   SELECT 333 pid, 'test2' txt1, 'pak3' txt2, 'ced3' txt3, 'su4' txt4 FROM dual UNION ALL
    12   SELECT 444 pid, 'test2' txt1, 'pak3' txt2, 'ced4' txt3, 'su3' txt4 FROM dual)
    13  SELECT b.pid, a.*
    14  from table1 a
    15     LEFT JOIN table2 b
    16        ON (a.txt1 = b.txt1 OR
    17            a.txt1 IS NULL AND a.txt2=b.txt2 OR
    18            Nvl(a.txt2, a.txt1) IS NULL AND a.txt3 = b.txt3 OR
    19            Nvl(a.txt2, a.txt1) IS NULL  AND a.txt3 IS NULL AND a.txt4 = b.txt4);
           PID TXT1   TXT2   TXT3   TXT4
           111 test   pak    ced    su
           222 null   pak    ced2   su2
           333 null   null   ced3   su3
           444 null   null   null   su3
    null       text5  null   null   su3
    null       null   null   null   nullJohn

  • Oracle OUTER JOIN on more than one table

    Hi!
    Friends, please help with this urgent problem: How can an outer join be written on more than one table?
    An SQL Server query:
    SELECT * from a INNER JOIN b on a.id = b.id LEFT OUTER JOIN c ON c.id = a.id AND c.id = b.id
    works fine with SQL SERVER
    But Oracle query:
    SELECT * from a,b,c WHERE a.id = b.id AND a.id = c.id (+) AND b.id = c.id (+)
    gives an error: OUTER JOIN cannot be used on more than one table? Why?
    I use OracleDriver from classes12.zip to connect to Oracle8i database.
    Please, help!

    The Oracle 8i and later SQL reference reads that the following "join_types" are supported and under this syntax it does not limit the LEFT OUTER JOIN (syntax the same as SQLServer example in original note) to two tables as implied in these notes:
    The join_type indicates the kind of join being performed:
    Specify INNER to indicate explicitly that an inner join is being performed. This is the default.
    Specify RIGHT to indicate a right outer join.
    Specify LEFT to indicate a left outer join.
    Specify FULL to indicate a full or two-sided outer join. In addition to the inner join, rows from both tables that have not been returned in the result of the inner join will be preserved and extended with nulls.
    You can specify the optional OUTER keyword following RIGHT, LEFT, or FULL to explicitly clarify that an outer join is being performed.

  • Translating SQL from MYSQL to ORACLE with more than one outer join.

    I will translate the following sqlquery from MYSQL to ORACLE:
    SELECT ticket.ticket_no,ticket.ticket_dato,ticket.ticket_subject,ticket.customer_id,customer_name,ticket.ticket_own_read, ticket.department_id, department.department_name, priority_name, tickstat_name, tickettype_name
    FROM customer, ticket left join department
    on ticket.department_id = department.department_id left join priority on ticket.priority_id = priority.priority_id
    left join ticketstatus on ticket.tickstat_id = ticketstatus.tickstat_id
    left join tickettype on ticket.tickettype_id = tickettype.tickettype_id
    where ticket.customer_id = customer.customer_id and customer.owner_id =
    #session.owner_id#
    I have tried in ORACLE with:
    SELECT ticket.ticket_no,ticket.ticket_dato,ticket.ticket_subject,ticket.customer_id,customer_name,ticket.ticket_own_read, ticket.department_id, department.department_name, priority_name, tickstat_name, tickettype_name
    FROM customer, ticket ,department, priority, ticketstatus, tickettype
    where
    ticket.department_id(+) = department.department_id and
    ticket.priority_id(+) = priority.priority_id and
    ticket.tickstat_id(+) = ticketstatus.tickstat_id and
    ticket.tickettype_id(+) = tickettype.tickettype_id and
    ticket.customer_id = customer.customer_id and customer.owner_id = #session.owner_id#
    I get an error:
    MERANT][ODBC Oracle driver][Oracle]ORA-01417: a table may be outer joined to at most one other table
    How do I translate the code to ORACLE?

    I think that your syntax is wrong. The (+) operator should be on the right hand table column, not the left hand table column if you want all rows on the left hand table column. If this syntax is really what you want, you can create underlying views for each join condiction.

  • Oracle.jbo.RowAlreadyDeletedException with outer join

    Hi,
    I have created a VO, based on an EO, with an outer join present.
    The first time I query my data (search) everything goes well, but when I perform a search the second time, I receive the error message: "oracle.apps.fnd.framework.OAException: oracle.jbo.RowAlreadyDeletedException: JBO-25019: Entiteitsrij van sleutel oracle.jbo.Key[202 53162 ] not found in XxpostMmpParametersEO."
    The reason why is because of the outer join there is no 1 to 1 relationship between the EO and the VO. However for the first time , it works fine.
    Does someone have an idea how I can avoid the error for my second search action?
    Thanks in advance!
    br
    Guy

    Hi all,
    the following article:
    http://radio.weblogs.com/0123729/stories/2003/05/15/entityObjectOverTableWhosePrimaryKeyMayBeNull.html
    suggest a possible workaround. It wok fine, but it is not generic! :((
    By
    Alessandro

  • Outer join query for SQL server from Oracle

    Hi All,
    My question is regarding making queries from Oracle to SQL Server database thorugh DBLink.
    In my oracle database I have a DBLink emp.world for SQL Server database.
    I need to query SQL Server data from oracle (so that this query can be combined with other oracle tables).
    Query is given below:
    SELECT
            a."EmpID" as "Employee ID",
            a."EmpStatus" "Employee Status"
            b."EmpSub" as "Employee Subjects"
    FROM
            [email protected] a
            left outer join [email protected] b on a."EmpID" = b."suEmpID"
    ORDER BY  a."EmpID";My problem is when I run the same query from oracle, it does not show the EmpID that does not exist in Subjects table, but when run from actual SQL Server database, it shows all the records.
    Samples are given below:
    Run from Oracle
    Employee ID      Employee Status     Employee Subjects
    101                     Active                     Maths
    102                     Active                     Maths
    102                     Active                     Physics
    104                   Inactive                  Chemistry
    Run form SQL Server
    Employee ID      Employee Status     Employee Subjects
    101                     Active                     Maths
    102                     Active                     Maths
    102                     Active                     Physics
    103                 Active                       NULL
    104             Inactive            ChemistryI am not sure why in oracle outer join for SQL server tables is not working. What is the right way for outer join in this case.
    I am using oracle database 10gR2 and SQL Server 2005.
    Please Help.
    Thanks.

    SELECT
    a."EmpID" as "Employee ID",
    a."EmpStatus" "Employee Status"
    b."EmpSub" as "Employee Subjects"
    FROM
    [email protected] a
    left outer join [email protected] b on a."EmpID" = b."suEmpID"
    ORDER BY a."EmpID";
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm#sthref3175
    From your description, it appears you may need a right outer join. You want to get back all the rows from 'B', not from 'A'. Try a right join and let us know.

Maybe you are looking for

  • Inconsistência no consumo de materiais

    Prezados, Gostaria de uma auxílio de vocês no seguinte ponto, com relação a administração de projetos. Temos algumas pendências de consumos de materiais serializados no nosso sistema, porém ao tentar efetuar o consumo dos materiais (MIGO) para WBS de

  • Finder crashes when right clicking on a file

    I'm new to Tiger/Apple and don't know how to make heads nor tails of this Finder.Crash.Log. Finder crashes more often than not when I right click on a file. Please help. Here is the log file: Host Name: xxxxxx-computer Date/Time: 2007-01-24 06:05:36.

  • Where is the search field in iTunes Store?

    What happened to the search field in the store?

  • Update 3

    How can I get Update 3 OS version: 8.0.10501.127 or 8.0.10512.142 as my Lumia 720 says phone is up to date. (after amber update) But has OS version of 8.0.10328.78  http://www.windowsphone.com/en-in/how-to/wp8/basics/windows-phone-8-update-history So

  • Human Task form deployment issue

    Dear Experts, How to deploy Human Task form WAR file to the BPEL OC4J container through SOA em console. I have viewed through em console but i cant see any option for (war or ear ) work flow deployment. Please suggest. Thanks Rajesh A