Left outer join using multiple table

Hi,
I am trying to use left outer join with multiple tables , the join condition will be based on  PERNR and BEGDA & ENDA for each infotype in selection screen.
  select pa00~pernr pa00~begda pa00~endda pa00~massn pa00~massg pa00~stat2 pa00~aedtm pa00~uname
    pa01~begda pa01~endda pa01~bukrs pa01~persg pa01~persk pa01~mstbr pa01~ename pa01~aedtm pa01~uname
    pa02~begda pa02~endda pa02~nachn pa02~vorna pa02~midnm pa02~aedtm pa02~uname
    pa016~begda pa016~endda pa016~cttyp pa016~aedtm pa016~uname
    into CORRESPONDING FIELDS OF TABLE i_pall
    from  ( PA0000 as pa00 left OUTER JOIN pa0001 as pa01 on pa00~pernr = pa01~pernr )
    left OUTER JOIN pa0002 as pa02 on pa00~pernr eq pa02~pernr )
    left OUTER JOIN  pa0016 as pa016 on pa00~pernr eq pa016~pernr )
    where pa00~pernr in S_pernr
    AND pa00~begda in s_bg0000
    and pa00~endda in s_nd0000.
but this fails  to fetch the value of begda enda from each pa0000,pa0001,pa0002,pa0016.
Please help!
Monirul

Why don't you use the standard logical database PNPCE and then Provide statement?

Similar Messages

  • Left outer join using anyOfAllowingNone

    Hi,
    I'm trying to join two tables (tableA and tableB) with left outer join using anyOfAllowingNone (One to many relationship) and try to fetch the tableB data with some constraint on it.
    But the sql generated out of the expression builder is not a proper left join, it actually forms a inner join, which brings only table A data which satisfies all the condition. Actually I want all of tableA data and for every record from tableA I want the data from TableB which matches the key from tableA to tableB and some condition applied on tableB data.
    I guess I'm doing some thing wrong, I went through the document and sample but still its not getting me the right data.
    Below is my expression builder:
    exp = builder.get("tableA_K").equal(some value);
    exp = exp.and(builder.get("effectiveIn").toChar("MM/dd/yyyy").lessThanEqual(date));
    exp = exp.and(builder.get("effectiveOut").toChar("MM/dd/yyyy").greaterThanEqual(date));
    exp1 = builder.anyOfAllowingNone("tableBCollectionAttribute").get("effectiveIn").toChar("MM/dd/yyyy").lessThanEqual(date);
    exp1 = exp1.and(builder.anyOfAllowingNone("tableBCollectionAttribute").get("effectiveOut").toChar("MM/dd/yyyy").greaterThanEqual(date));
    return exp.and(exp1);
    Below is the sample query generated:
    select distinct tableA.all data
    where (((((tableA.key = 2219785)
    and (to_char(tableA.EFFECTIVE_IN_S, 'MM/dd/yyyy') <= '03/27/2008'))
    and (to_char(tableA.EFFECTIVE_OUT_S, 'MM/dd/yyyy') >= '03/27/2008'))
    and ((to_char(tableB.EFFECTIVE_IN_S, 'MM/dd/yyyy') <= '03/27/2008')
    and (to_char(tableB.EFFECTIVE_OUT_S, 'MM/dd/yyyy') >= '03/27/2008')))
    and (tableB.key (+) = tableA.tableB_Key))
    Any help is appreciated. Thanks
    Sai.

    hi Mansi,
    this is how i populate
    SELECT VGBEL LFIMG POSNR VBELN FROM LIPS INTO  TABLE IT_delv  FOR ALL ENTRIES IN IT_VBAP WHERE VGBEL = IT_VBAP-VBELN.
    LOOP AT IT_delv INTO WA_delv.
    WA_FINAL-VBELN_1 = WA_DELV-VBELN_1.
    WA_FINAL-LFDAT =   WA_DELV-LFDAT.
    WA_FINAL-LFIMG   = WA_DELV-LFIMG.
    WA_FINAL-POSNR2 =   WA_DELV-POSNR2..
    APPEND WA_FINAL TO IT_FINAL.
    CLEAR: WA_FINAL , WA_delv.
    ENDLOOP.
    LOOP AT IT_FINAL INTO WA_FINAL.
    READ TABLE IT_vbap INTO WA_vbap WITH KEY VGBEL = WA_FINAL-VBELN.
      WA_FINAL-VBELN = WA_VBAP-VBELN.
    WA_FINAL-MATNR = WA_VBAP-MATNR.
    WA_FINAL-KWMENG = WA_VBAP-KWMENG.
    WA_FINAL-NETWR = WA_VBAP-NETWR.
    MODIFY IT_FINAL FROM WA_FINAL.
    ENDLOOP.
    My question is , it_vbap has 5 five records A,B,C,D,E.
    in it_delv ,there are 20 record corrresponding to A,B,D of IT_VBAP.
    in final table i wont get info of recors B,E. I want those info also in final table ..how can i do that...

  • Oracle outer join on  multiple tables throws error

    Hi ,
    We are using ansi joins with outer joins on multiple tables in oracle 9i.
    Now these queries have to be used in Oracle8i.
    Since Oracle8i does not support ansi sql we are replacing the ansi sql queries with the oracle joins.
    On trying the same we found that the following query
    select *from tab1 a, tab2 b, tab3 c where a.c1 = b.col1(+) and c.c2 = b.col2 (+)
    throws the error
    ORA-01417: a table may be outer joined to at most one other table.
    Is there a way to simulate this query without using the outer joins on multiple tables?
    thanks

    Try writing the query in this form:
    select * from
    (select t1.col1, t1.col2
    from schema.table1 t1, schema.table2 t2
    where t1.col1 = t2.col1(+)) t4,
    schema.table3 t3 where t4.col2 = t3.col2(+)
    In the subquery, you will have to list all the columns you want to see, and you will need to provide unique aliases for any columns with duplicate names. I tested this on 9i, and don't have an 8i system to work with, so I hope this helps.

  • Left outer join using For All Entries

    how to implement left outer join using for all entries In REPORTS.

    hi Mansi,
    this is how i populate
    SELECT VGBEL LFIMG POSNR VBELN FROM LIPS INTO  TABLE IT_delv  FOR ALL ENTRIES IN IT_VBAP WHERE VGBEL = IT_VBAP-VBELN.
    LOOP AT IT_delv INTO WA_delv.
    WA_FINAL-VBELN_1 = WA_DELV-VBELN_1.
    WA_FINAL-LFDAT =   WA_DELV-LFDAT.
    WA_FINAL-LFIMG   = WA_DELV-LFIMG.
    WA_FINAL-POSNR2 =   WA_DELV-POSNR2..
    APPEND WA_FINAL TO IT_FINAL.
    CLEAR: WA_FINAL , WA_delv.
    ENDLOOP.
    LOOP AT IT_FINAL INTO WA_FINAL.
    READ TABLE IT_vbap INTO WA_vbap WITH KEY VGBEL = WA_FINAL-VBELN.
      WA_FINAL-VBELN = WA_VBAP-VBELN.
    WA_FINAL-MATNR = WA_VBAP-MATNR.
    WA_FINAL-KWMENG = WA_VBAP-KWMENG.
    WA_FINAL-NETWR = WA_VBAP-NETWR.
    MODIFY IT_FINAL FROM WA_FINAL.
    ENDLOOP.
    My question is , it_vbap has 5 five records A,B,C,D,E.
    in it_delv ,there are 20 record corrresponding to A,B,D of IT_VBAP.
    in final table i wont get info of recors B,E. I want those info also in final table ..how can i do that...

  • Case statement resulting into Left outer join with other tables

    Hi All ,
    I am facing a stuation where a Case statement on one of the logical columns in Answers is resulting into a left outer join with a table in the query.
    If we remove the case stmt, the table is not being acessed.
    The case stmt is a simple one and no other logical column is being accessed in the case stmt.
    Please advice .
    Thanks.

    Hi Sai,
    No ..we dont have any left outer join ...its just that I am selecting measure from F1 which has a confimred dimension D1 with F2.Now when I dont have case stmt on measure from F1(Case stmt is something like : CASE WHEN "- P table"."P Column" = 'Y' THEN 'Right' ELSE 'Wrong' END), then it doesnt query F2.
    However as soon as I introduce the case stmt ,the query creates a left outer join with F2.
    Thanks.

  • Left Outer Join on same table clarification

    HI,
    I have a table that gets populated from 3<sup>rd</sup> party system. We don’t have control over it. So, the table has master record (master) and children. Master type is 78 and children’s type is 64. So, it looks like this. In the 3<sup>rd</sup>
    party system, if Master transaction gets cancelled, it is recorded as type 178. If child is cancelled, then it is 164. Once the child is cancelled and created again using one process then newly created transaction will have 65 as type. Same thing with Master
    cancelled transaction also. It will be 79. So, to summarize:
    Master:                                                                                                                                                                      
    Brand New Transaction type = 78
    Cancelled Transaction type = 178
    Cancelled with creation transaction type = 79
    Child:
    Brand New Transaction type = 64
    Cancelled Transaction type = 164
    Cancelled with creation transaction type = 65
    I don’t have to bother about master records. I need to focus on only children for my query.
    ID
    TxnID
    Master
    Type
    TDate
    Location
    193075
    211554
    211543
    64
    20140805
    ABC
    193076
    211555
    211543
    64
    20140805
    NBC
    193077
    211556
    211543
    64
    20140805
    ABC
    193080
    211559
    211558
    64
    20140805
    ABC
    193081
    211562
    211561
    64
    20140805
    ABC
    193082
    211565
    211564
    64
    20140805
    CBC
    193083
    211565
    211564
    164
    20140805
    CBC
    193084
    211566
    211564
    65
    20140805
    AZC
    --drop
    table #Transactions
    CREATE
    TABLE #Transactions
    ID
    int,
    TxnID
    int,
    mstTicket
    int,
    Typecode
    int,
    Tdate
    datetime,
    Location
    varchar(10)
    select
    * from
    #Transactions
    Insert
    into #Transactions
    (ID,
    TxnID,
    mstTicket,Typecode,Tdate,Location)
    Select 193075, 211554,211543,64,'2014-08-05','ABC'
    UNION ALL
    Select 193076, 211555,211543, 64,
    '2014-08-05',
    'NBC' UNION ALL
    Select 193077, 211556, 211543, 64,
    '2014-08-05',
    'ABC' UNION
    ALL
    Select 193080, 211559, 211558, 64,
    '2014-08-05',
    'ABC' UNION
    ALL
    Select 193081, 211562, 211561, 64,
    '2014-08-05',
    'ABC' UNION
    ALL
    Select 193082, 211565, 211564, 64,
    '2014-08-05',
    'CBC' UNION
    ALL
    Select 193083, 211565, 211564, 164,
    '2014-08-05',
    'CBC' UNION
    ALL
    Select 193084, 211566, 211564, 65,
    '2014-08-05',
    'AZC'
    select
    T.TxnID,
    T.TypeCode,
    T.Location,
    TL.TxnID
    From
    #Transactions T
    Left Outer
    JOIN #Transactions
    TL ON
    TL.TxnID
    = T.TxnID
    and TL.TypeCode
    = 164
    select
    T.TxnID,
    T.TypeCode,
    T.Location,
    TL.TxnID
    From
    #Transactions T
    Left Outer
    JOIN #Transactions
    TL ON
    TL.TxnID
    = T.TxnID
    and TL.TypeCode
    = 164
    Where
    T.typecode
    in (64, 65)
    I need a clarification regarding left Outer Join. 
    In the first left outer join query both 64 and 164 both have TL.TxnID populated. Why is that?. What I understand from
    left outer join is that ‘Returns all the rows’ from left table and only matching data from right table.
    Here, matching row from right table is 211565 and 164 record (id 193083). So, only it should have TxnID populated. But row 211565 and 64 has TL.txnID getting populated (ID 193082).
    Why is it? Am I not understanding left out join properly?
    Thanks,

    Thank you Shailesh. I understood what join does in left outer join. I was thinking
     Left Outer JOIN #Transactions TL ON TL.TxnID = T.TxnID and TL.TypeCode = 164 is same as
    Left Outer JOIN #Transactions TL ON TL.TxnID = T.TxnID and TL.TypeCode = T.TypeCode
    and TL.TypeCode = 164
    #Transactions
    T
    Left
    Outer
    JOIN
    #Transactions
    TL
    ON
    TL.TxnID
    =
    T.TxnID
    and
    TL.TypeCode
    = 164
    Where
    T.typecode
    in
    (64,
    65)

  • Left outer join using date range returns too many rows

    I am trying to pull data for a website.
    Names table:
    company_name varchar2(30)
    julian_day varchar2(3)
    logins number(3)
    login_errors number(3)
    Given a julian date range (e.g. 250-252), I am displaying the information from the Names table.
    The problem is that I also need to display changes (increases/decreases) in the data. I do that by coloring the text based on a 10% increase/decrease. Data for the 3 days 250-252 would be compared to data for the previous 3 days 247-249.
    Not all companies will report data on all days, so some gaps in the data may exist. Therefore, I cannot do just a simple join.
    I am trying to write a query that will give me this information if the user chooses days 250-252.
    Company_name
    sum(logins) for days 250-252
    sum(login_errors) for days 250-252
    sum(logins) for days 247-249
    sum(login_errors) for days 247-249
    The query I'm using is:
    select cur.company_name, sum(cur.logins),
    sum(cur.login_errors), sum(old.logins), sum(old.login_errors)
    FROM names cur LEFT OUTER JOIN names old
    ON cur.company_name = old.company_name
    WHERE cur.adate>='250' and cur.adate<='252'
    and old.adate>='247' and old.adate<='249'
    GROUP by cur.company_name
    Given this data:
    Company_name adate logins login_errors
    ABC 247 10 10
    ABC 248 20 20
    ABC 249 30 30
    ABC 250 15 15
    ABC 251 25 25
    ABC 252 35 35
    My problem is that it returns:
    adate cur.logins cur.login_err old.logins old.login_err
    250 15 15 60 60
    251 25 25 60 60
    252 35 35 60 60
    How can I get it to only give me the one "old" day's data? I went with the LEFT OUTER JOIN because it's possible that there is no data for an "old" day.
    Thanks in advance.....

    Your problem stems from the join itself, and would be the same even without the OUTER JOIN. With your data, there are 3 records in cur and 3 records in old. The join matches each record in cur to each record in old resulting in 9 records in total. Without the SUM, this is clear:
    SQL> SELECT cur.company_name, cur.logins, cur.login_errors,
      2         old.logins, old.login_errors, cur.adate cad, old.adate oad
      3  FROM names cur LEFT OUTER JOIN names old
      4                 ON cur.company_name = old.company_name
      5  WHERE cur.adate>=250 and cur.adate<=252 and
      6        old.adate>=247 and old.adate<=249;
    COMPANY_NA     LOGINS LOGIN_ERRORS     LOGINS LOGIN_ERRORS        CAD        OAD
    ABC                35           35         10           10        252        247
    ABC                25           25         10           10        251        247
    ABC                15           15         10           10        250        247
    ABC                35           35         20           20        252        248
    ABC                25           25         20           20        251        248
    ABC                15           15         20           20        250        248
    ABC                35           35         30           30        252        249
    ABC                25           25         30           30        251        249
    ABC                15           15         30           30        250        249
    9 rows selected.You can do this with only one reference to the table.
    SELECT company_name,
           SUM(CASE WHEN adate BETWEEN 250 and 252 THEN logins ELSE 0 END) curlog,
           SUM(CASE WHEN adate BETWEEN 250 and 252 THEN login_errors ELSE 0 END) curerr,
           SUM(CASE WHEN adate BETWEEN 247 and 249 THEN logins ELSE 0 END) oldlog,
           SUM(CASE WHEN adate BETWEEN 247 and 249 THEN login_errors ELSE 0 END) olderr
    FROM names
    WHERE adate BETWEEN 247 and 252
    GROUP BY company_nameHTH
    John

  • Left outer join with multiple conditions

    Is it possible to add to a left outer join (= anyOfAllowingNone) more than the primary condition (in SQL this would be added per "and").
    Background: The execution plan of the produced SQL shows large results on which the final filter is applied although I have conditions that would decrease this last result set much earlier...

    There is no easy way to do this in TopLink expressions, other than including the join in the regular where clause as you have done. Does it make a big impact in the performance of your query?
    <p>
    You could use custom SQL for the query.
    <p>
    Or you could potentially define a OneToOneQueryKey in your TopLink descriptor that includes the additional join criteria and call anyOfAllowingNone using this query key.
    <p>
    <p>---
    <p>James Sutherland

  • Outer join on multiple tables

    Hi All,
    I need to create multiple outer join in Discoverer.
    My requirements is like this
    I have a report where in I show the sales of components. I have Year as page item in Discoverer cross tab.
    I have 2 years in my year table, 1999 and 2000
    in the components table I have 3 components, X, Y, Z
    In the fact table, I have 5 records as below
    YEAR     PRODUCT     AMOUNT
    1999     X     100
    1999     Y     200
    1999     Z     300
    2000     X     400
    2000     Y     500
    Now with this data, when I create a cross tab with year as page item, I get the following output on selecting 1999 as year in page item,
    component     Amount SUM
    X     $100
    Y     $200
    Z     $300
    similarly when I get report for 2000 it will be as follows
    component     Amount SUM
    X     $400
    Y     $500
    Now I want some way to get a report as below for 2000 and similar cases
    component     Amount SUM
    X     400
    Y     500
    Z     0
    Can some body help me??
    Thanks,

    Hi Mrutyunjay,
    If you keep the query as described by Csaba but leave out time_period.year from the SELECT and GROUP BY list. In addition, replace the SUM(...) function with the following expression.
    SUM (CASE WHEN <condition> THEN fact_tab.amount ELSE 0 END)
    Where <condition> will be along the lines of 'time_period.year = 1999'.
    This will give you the result you require.
    Do be aware that this will force Oracle to do a full scan on the fact_tab table. This may render the solution unworkable.
    Cheers,
    denty.

  • 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

  • Oracle 8i -multiple LEFT OUTER JOIN

    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 a.display(+)=b.display
    and a.name(+)='Done';
    Thanks.

    FROM test a LEFT JOIN test1 b ON b.key = a.keyis equivalent to
    FROM test a, test1 b WHERE b.key(+) = a.keyThere is a restriction (when using the "(+)" syntax) that a table may be outer-joined to at most one other table, but that does not prevent you from having multiple join conditions between those two tables.
    From your example I'm not sure whether you need this:
    SELECT a.id, b.id
    FROM   test a
         , test1 b
    WHERE  a.name = 'Done'
    AND    b.id (+)= a.id
    AND    b.display (+)= a.display;or this:
    SELECT a.id, b.id
    FROM   test1 b
         , test  a
    WHERE  a.id (+)= b.id
    AND    a.display (+)= b.display;
    WHERE  a.name (+)= 'Done';

  • 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.

  • Restriction to Left Outer Joins in PS Query

    Hello I am trying to do Left Outer JOin in PS QUERY. I need to do dept tbl, job code tbl and locatable as left outer joins with JOB Table. Looks like in PS QUERY there is a error message saying as below. Can someone has any workaround to achieve this in PS QUERY. I know I can create a View and use that in PS QUERY but BUsiness Users are dependent on IT, so that doesn't work. Also, adding JOB table multiple times works but I am looking for better solution if anyone had come accorss working through PS QUERY Outer JOins.
    Windows Internet Explorer
    Left outer joins must be joined to the last record in the query. (139,290)
    OK
    Thanks,
    SC.

    Hi Mike,
    According to your description, you want to improve the performance for your DAX query in SQL Server Analysis Service Tabular model, right? Here is a white paper describes strategies and specific techniques for getting the best performance from your tabular
    models, including processing and partitioning strategies, DAX query tuning, and server tuning for specific workloads.
    http://msdn.microsoft.com/en-us/library/dn393915.aspx
    Since this is a complex DAX query, from a support perspective this is really beyond what we can do here in the forums. If you cannot determine your answer here or on your own, consider opening a support case with Microsoft. Visit this link to see the various
    support options that are available to better meet your needs:
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Regards,
    Charlie Liao
    TechNet Community Support

  • 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.

  • Error in making left outer join to a nested query

    i am writing this query getting error here i am using nested query with that i am making join it is giving error
    SQL
    SELECT
    * FROM IVItem INNER JOIN
    IVPackSize_Mst ON IVItem.PackSizeID = IVPackSize_Mst.Id
    left outer join IvItemGenericLink on IvItemGenericLink.itemID=IVItem.Id
    Select GenericId from
    IvItemGenericLink where ItemID=IVItem.Id and rownum <=1
    )x
    and x on IvItemGenericLink.GenericId=x.GenericId;
    Error report:
    SQL Error: ORA-00936: missing expression
    00936. 00000 - "missing expression"
    *Cause:   
    *Action:
    give me and suggestion

    i am using left outer join at virtual table say x your gave me its equivalent
    EXISTS (SELECT 1 FROM IvItemGenericLink G
    WHERE G.ITEMID =V.ID
    AND G.GenericId = L.GenericId)-----its i guess inner join
    i am not confirmed that why iam asking this i guess i have to use this
    as i use keyword inner join for inner join and for left join i use
    left outer join
    EXISTS (SELECT 1 FROM IvItemGenericLink G
    WHERE G.ITEMID =V.ID
    AND G.GenericId(+) = L.GenericId)-----its i guess left outer join
    left outer join
    Select GenericId from
    IvItemGenericLink where ItemID=IVItem.Id and rownum <=1
    )*x*
    IvItemGenericLink.GenericId=x.GenericId
    -------------------Statement U Gave in this--------------------------------------------------------------------------
    SELECT *
    FROM IVITEM V, IVPACKSIZE_MST M , IVITEMGENERICLINK L,
    WHERE V.PACKSIZEID = M.ID
    AND V.ID = L.ITEMID (+)
    AND EXISTS (SELECT 1 FROM IvItemGenericLink G
    WHERE G.ITEMID =V.ID
    AND G.GenericId = L.GenericId)
    -------------------Statement U Gave in this--------------------------------------------------------------------------
    is this equivalent to left outer join
    *AND EXISTS (
    SELECT 1 FROM IvItemGenericLink G*
    WHERE G.ITEMID =V.ID
    *AND G.GenericId = L.GenericId
    please tell me this in this regard

Maybe you are looking for

  • CC 2014.1 error 5 crash on load, how to fix?

    I get this every time I try to load after effects: Configuration error Please uninstall and reinstall the product. If this problem still occurs, please contact Adobe technical support for help, and mention the error code shown at the bottom of this s

  • ODBC Data Source Won't Recover from Connection Errors

    I have several ODBC data sources to a mainframe and want to use the "Maintain Connections" setting as it dramatically improves performance under heavy load. Problem is that we frequently have path problems between the CF server and the mainframe 180

  • Missing Printer Jobs Info in Mtn Lion

    I frequently keep two printers going.  They do not operate at the same speed, and one is sometimes tied up on other tasks like scanning, so I want to be able to track pending jobs -- how many of the 18 copies are left to print on one, and how many of

  • Phone showing white screen

    I dropped my phone and it is showing an all white screen.  I tried re-setting it several times but it did not work. I took it to the apple store.  They said I needed a new LCD screen.  I put a new one in and it is still showing all white.  Anybody ha

  • ID3v2: Programmers' habits when describing bit-operations

    Hi. I'm trying to implement a class that can read ID3v2 tags from MP3 files. The id3.org site seems to be the only source on the net where you can get information about the organisaton of ID3 tags. Unfortunately I haven't worked with bit operations b