Need help in joins in OBIEE 10G

Hi All,
I have 2 tables like following.
Table 1: Team
Id| Team Name| Resource id
1 | xxx | 1
2 | yyy | 1
3 | zzz | 1
4 | xxx | 2
Table 2: Resource Rate
RSRC ID| Resource Name| Rate | Month | year
1 | John | 10 | Jan | 2012
2 | Max | 5 | Jan | 2012
I have joined these 2 tables with Resource ID. I have a prompt with Team Name and Resource Name and I have a OBIEE chart report (Month,Year Vs Rate), in which if do not select team name in prompt or select only one team name then the results are fine but when i select 2 team names in the prompt for example 'xxx','yyy' the results gets doubled. If I select 3 team names, the result will be rate*3. But I want the result to be same value even after I select more than one team name.
How to archive this??? Kindly help
Edited by: GJ on Sep 10, 2012 10:39 PM
Edited by: GJ on Sep 10, 2012 11:53 PM

Hi Veeravalli,
No I cannot have team name after resource name, because the purpose is to see based on team and then on resource. Moreover their is nothing wrong with queries generated, it is working as it is expected, Since the resource is mapped to 2 teams, I am getting duplicate values.
I am just trying to find if there is a way to return always unique values.

Similar Messages

  • Need information on licensing in OBIEE 10g

    Experts ,
    Can you guide me on how licensing works in OBIEE 10g ?
    Scenario : If there is one license for a PROD box for 1 Project ,then can other team use that PROD box.
    Is there any document on Licensing .
    Appreciate your help .
    Thanks,
    Anand

    I dont think there is any documentatoin on the licensing part. You can probably talk to the Live sales chat representative to get the information you needed from oracle.( http://www.oracle.com/us/solutions/ent-performance-bi/enterprise-edition-066546.html ).

  • Need help on join query

    Hi All,
    Please help me on the below join condition,
    >SELECT * FROM ESTIMATE_LINE WHERE JOB_ID = '214582' AND ESTIMATE_ID = 2;
    Output : Returns 1 row,
    >SELECT * FROM ESTIMATE_ACCOUNTING_LINE WHERE JOB_ID = '214582' AND ESTIMATE_ID = 2;
    Output : Returns 3 rows,
    I would like to add these two outputs as on, Finally i've to get 4 rows in the output,
    For that am writing the query like this,
    SELECT EL.*,EAL.*
    FROM ESTIMATE_LINE EL,
    ESTIMATE_ACCOUNTING_LINE EAL
    WHERE EL.JOB_ID = EAL.JOB_ID (+)
    AND EL.ESTIMATE_ID = EAL.ESTIMATE_ID (+)
    AND EAL.JOB_ID = '214582'
    AND EL.ESTIMATE_ID = 2,
    It is not giving the exact output, the common fields are there in the join condition,
    Can some one please re write the query for expected output..
    I am trying it but not getting the exact output,Unable to find out where the mistake is ...
    Thanks,
    gra

    Hi,
    First, let me make sure I undersatnd the problem.
    You have a query that lookas for information about a given job_id and estimate_id the estimate_line table. This query produces X rows.
    You have another query that lookas for information about the same job_id and estimate_id the estimate_accounting__line table. This query produces Y rows.
    You want to get the same results in one query that produces X+Y rows.
    That sounds like a job for UNION, not a join.
    If the two queries produces the same number of columns, and the data types of the columns are similiar, then you can just write the two queries together. Instead of a semicolon at the end of the first query, you'll say UNION (or UNION ALL):
    SELECT * FROM ESTIMATE_LINE            WHERE JOB_ID = '214582' AND ESTIMATE_ID = 2
    UNION ALL
    SELECT * FROM ESTIMATE_ACCOUNTING_LINE WHERE JOB_ID = '214582' AND ESTIMATE_ID = 2;If the columns are not the same, you'll need to call some conversion functions, or add literal columns (such as NULL) to the queries.
    If you need help, post a little sampe data (CREATE TABLE and INSERT statements) and the results you want from that data.

  • Need help with opatch for OBIEE 11g

    I'm running into some more of Oracle's typical gibberish and poorly written documentation, and need some help patching OBIEE 11g.
    I'm TRYING to follow the instructions here:
    https://updates.oracle.com/Orion/Services/download?type=readme&aru=13160647
    So, let's see. How about step 2:
    For FMW Opatch usage, please refer the doc at :
    http://www.oracle.com/technology/software/products/ias/files/fmw_opatch.htm
    Well, that IP address automatically redirects to the general download page:
    http://www.oracle.com/technetwork/indexes/downloads/index.html
    Nice.
    So, let's try this doc:
    http://docs.tpu.ru/docs/oracle/en/owl/E14571_01/doc.1111/e16793/opatch.htm#CBHDEGBJ
    Section 2.3.2, "Patching a Fusion Middleware Product"
    Quoting: "Once you obtain the patch, determine the Oracle home directory to which you are going to apply the patch....If you do not know the name of your Oracle home, you should run the opatch lshomes command as described in Section 2.4.6, "Listing the Applicable Oracle Homes for a Patch" to obtain a list of Oracle homes that pertain to the domain."
    So let's see, I've got two OPATCH.BAT files, one in c:\mw_home1\Oracle_BI1=OPatch\, and the other in c:\mw_home1\oracle_common\OPatch\.
    I open a command window, CD to one of those paths, and run opatch lshomes. I get this error:
    "The Oracle Home C:\mw_home1 is not OUI based home. Please give proper Oracle Home. OPatch returns with error code = 1. OPatch failed with error code = 1"
    Same results for the other opatch.bat in the other directory.
    Besides the atrocious grammar, this error message is not helpful in the least. I'm trying to patch OBIEE 11g, which is installed in c:\mw_home1. What else is opatch wanting?

    Yes, the error message is misleading. It should say something like "Environment variable ORALCE_HOME has not been set or set incorrectly".
    Here is how I solved the problem on a Windows Oracle Fusion Middleware SOA installation. The SOA installation already comes with OPatch installed. In my case it is located in D:\Oracle\Middleware\Oracle_SOA1\OPatch. On a command prompt, I set the environment variable ORACLE_HOME like this
    set ORACLE_HOME=D:\Oracle\Middleware\Oracle_SOA1
    and the CLASSPATH variable like this
    set classpath=
    The latter prevents opatch from loading classes it does not need and throwing java.lang.ClassNotFoundException. Also notice ORACLE_HOME does not point to D:\Oracle\Middleware but D:\Oracle\Middleware\Oracle_SOA1. I made a mistake by setting ORACLE_HOME to D:\Oracle\Middleware kept getting:
    "Recommended actions: Please make sure no other OPatch or OUI processes is running. Try to run $ORACLE_HOME/oui/bin/runInstsaller.
    OPatch failed with error code = 20"
    I wasted a lot of time trying to figure out what went wrong.

  • Need Help on Joining multiple tables in Golden Gate

    Hi,
    Can you please help me with some examples on joining multiple tables in Golden Gate. i.e, my requirement is to Join Table 1 & Table 2 in Source and Load it in Target with 10 fields from Table 1 & 5 fields from Table 2 based on the join condition between Table 1.key = Table2.key
    I have been trying to do that using SQLEXEC command in Golden Gate. But, is there a way I can do this in the Extract parameter file?
    Thanks for your time
    Regards
    Suresh

    Hi,
    Thanks a lot for the prompt reply. I am able to do that for the below scenario
    Source.T1.Field1
    Source.T1.Field2
    Source.T2.Field1
    Source.T2.Field2
    Target Table
    T1.Field1, T1.Field2, T2.Field1, T2.Field2.
    But, if I already have T2.Field1 in T1 table, then T1.Field1 takes the precendence and getting loaded. i.e., I wanted to join the table 1 & Table 2 and based on the matching condition, I will need to populate the data either from T1 or T2.
    Hope you got my requirement.
    Below the Data Dump file & Replicat File.
    EXTRACT dpump
    USERID ********, PASSWORD ********
    RMTHOST *******, MGRPORT 7809
    RMTTRAIL /oracle/gg/dirdat/rt
    --PASSTHRU
    TABLE TABLE1,
    SQLEXEC (ID LOOKUP,
    QUERY "SELECT FIELD1 FROM SOURCE.TABLE2 WHERE FIELD1 = :v_field1",
    PARAMS ( v_field1 = field1 )),
    TOKENS (tk_field_1 = @GETVAL (lookup.field1));
    Replicat file
    REPLICAT repjoin
    ASSUMETARGETDEFS
    HANDLECOLLISIONS
    USERID *******, PASSWORD ********
    MAP SOURCE.T1, TARGET TARGET.GG_TABLE_T1,
    COLMAP ( USEDEFAULTS ,
    field1 = @token ("tk_party_id"));
    I eventually wanted to join like below.
    select t1.field1, t1.field2, t2.field1 from t1, t2
    where t1.field1 = t2.field1;
    Thanks for your time again
    Regards
    Suresh

  • Need help with join

    Extract each entry from BSEG for BELNRs in BKPF-BELNR,
    and KOSTL in ZTABLE-KOSTL.
    sum(DMBTR) by KOSTL into
    internal tab <ITAB (fields KOSTL, DMBTR)>.
    i wrote the code like this:
    Select sum( aDMBTR ) aKOSTL into inkostltotal from BSEG as a
    inner join BKPF as b on bBELNR = aBELNR
    inner join Ztable as c on c~KOSTL = a-KOSTL
    group by a~KOSTL.
    it was giving error:
    You cannot use comparisons with column column references in pool and
    cluster tables: "A~BELNR". column references in pool and cluster
    tables: "A~BELNR". column references in pool and cluster tables:
    "ABELNR". column tables: "ABELNR".
    i need to use select, sum, group by to solve this can some one
    help me with this.

    hi saritha,
                   y ur not using for all entries, that will best in this situation.
    use for all entries like that
    CLEAR : T_EQUZ,T_EQUZ[].
    SELECT * FROM EQUZ INTO TABLE T_EQUZ
                       WHERE DATBI = '99991231'.
    IF NOT T_EQUZ[] IS INITIAL.
      select J_3GBELNRI equnr J_3GEMPFAE into
           corresponding fields of table
           T_J_3GBELP from J_3GBELP
           FOR ALL ENTRIES IN T_EQUZ
           where j_3guposnr ne '1'
           and J_3GEMPFAE in Reciver
           and equnr = T_EQUZ-EQUNR.
    regards
    vijay dwivedi
    rewards if usefull

  • Need help in Join statements

    Need to join these tables EKPO(Purchasing Doc Item), EKET(Scheduling Agreement Schedule line), MAKT(Material Desc), LIPS(SD Doc: Delivery Item data) tables.
    The fields that EKPO has is ebeln,ebelp,matnr,menge, meins
    The fields that EKET has is ebeln,ebelp,etenr,dat01.
    The fields that MAKT has is matnr,spras,makts.
    The fields that LIPS has is vbeln,posnr,matnr,vgpos,erdat,vrkme,lfimg.
    The output needs to as
    ebeln from table ekpo-ebeln
    ebelp from table lips-vgpos
    matnr from table ekpo-matnr
    menge from table ekpo-menge
    meins from table ekpo-meins
    vrkme from table lips-vrkme
    vbeln from table lips-vbeln
    lfimg from table lips-lfimg
    erdat from table lips-erdat
    dat01 from table eket-dat01
    maktx from table makt-maktx
    The selection screen has ekpo-ebeln and eket-dat01 as select-options
    and parameters as ekpo-bukrs and ekpo-werks.
    Please suggest as to how to write this join with the above tables.

    Hi,
    I tried joining your tables using inner join. Here is sample code which I have written.
    REPORT  ZAM_TABLEJOIN.
    tables: ekpo,eket,makt,lips.
    select-options: s_ebeln for ekpo-ebeln,
                    s_dat01 for eket-dat01.
    parameters: p_bukrs type ekpo-bukrs,
                p_werks type ekpo-werks.
    types: begin of itabtype,
    ebeln type ekpo-ebeln,
    ebelp type lips-vgpos,
    matnr type ekpo-matnr,
    menge type ekpo-menge,
    meins type ekpo-meins,
    vrkme type lips-vrkme,
    vbeln type lips-vbeln,
    lfimg type lips-lfimg,
    erdat type lips-erdat,
    dat01 type eket-dat01,
    maktx type makt-maktx,
    end of itabtype.
    data: itab type standard table of itabtype,
          wa like line of itab.
    SELECT a~ebeln
    d~vgpos
    a~matnr
    a~menge
    a~meins
    d~vrkme
    d~vbeln
    d~lfimg
    d~erdat
    b~dat01
    c~maktx
    FROM ekpo AS a
    INNER JOIN eket AS b
    ON aebeln EQ bebeln AND aebelp EQ bebelp
    INNER JOIN makt AS c
    ON amatnr EQ cmatnr
    INNER JOIN lips AS d
    ON amatnr EQ dmatnr
    INTO TABLE itab
    WHERE aebeln IN s_ebeln AND bdat01 IN s_dat01 AND a~bukrs EQ p_bukrs
    AND a~werks EQ p_werks.
    loop at itab into wa.
    write: / wa-ebeln, wa-ebelp,wa-matnr,wa-menge, wa-meins, wa-vrkme,
    wa-vbeln, wa-lfimg, wa-erdat, wa-dat01, wa-maktx.
    endloop.
    Hope this helps you. Please correct me if there is anything wrong in this code.
    Reward All Helpful Answers!!!!
    Sunny

  • 3d Games - need help just joined

    Hello there, I have just joined this forum and am wondering where to start. I downloaded a 3d engine yesterday called 3DzzD although I didn't find it that useful. Could anyone point me in the right direction as to what I need to download etc so that I can make my own 3d game using the java script?
    Much appreciated,
    Mr.Clym
    Ps: I have never used Java script before, Although I have used other different codes before, is there some tutorials that I could read to find out about scripting in java3d?
    Message was edited by:
    Mr.Clym

    Ok, thx for your help but could you give me a link to
    a java script forum? and a link to the game forum? as
    I said I am very new to java
    Message was edited by:
    Mr.Clym
    JavaScript forums:
    http://www.google.com/search?hl=en&q=javascript+forum&btnG=Google+Search
    Java game-section of this forum:
    http://forum.java.sun.com/forum.jspa?forumID=406
    Difference between Java and JavaScript:
    http://www.developer.com/java/other/article.php/639301

  • Need help to join two tables using three joins, one of which is a (between) date range.

    I am trying to develop a query in MS Access 2010 to join two tables using three joins, one of which is a (between) date range. The tables are contained in Access. The reason
    the tables are contained in access because they are imported from different ODBC warehouses and the data is formatted for uniformity. I believe this cannot be developed using MS Visual Query Designer. I think writing a query in SQL would be suiting this project.
    ABCPART links to XYZPART. ABCSERIAL links to XYZSERIAL. ABCDATE links to (between) XYZDATE1 and ZYZDATE2.
    [ABCTABLE]
    ABCORDER
    ABCPART
    ABCSERIAL
    ABCDATE
    [ZYXTABLE]
    XYZORDER
    XYZPART
    XYZSERIAL
    XYZDATE1
    XYZDATE2

    Thank you for the looking at the post. The actual table names are rather ambiguous. I renamed them so it would make more sense. I will explain more and give the actual names. What I do not have is the actual data in the table. That is something I don't have
    on this computer. There are no "Null" fields in either of the tables. 
    This table has many orders (MSORDER) that need to match one order (GLORDER) in GLORDR. This is based on MSPART joined to GLPART, MSSERIAL joined to GLSERIAL, and MSOPNDATE joined if it falls between GLSTARTDATE and GLENDDATE.
    [MSORDR]
    MSORDER
    MSPART
    MSSERIAL
    MSOPNDATE
    11111111
    4444444
    55555
    2/4/2015
    22222222
    6666666
    11111
    1/6/2015
    33333333
    6666666
    11111
    3/5/2015
    This table has one order for every part number and every serial number.
    [GLORDR]
    GLORDER
    GLPART
    GLSERIAL
    GLSTARTDATE
    GLENDDATE
    ABC11111
    444444
    55555
    1/2/2015
    4/4/2015
    ABC22222
    666666
    11111
    1/5/2015
    4/10/2015
    AAA11111
    555555
    22222
    3/2/2015
    4/10/2015
    Post Query table
    GLORDER
    MSORDER
    GLSTARTDATE
    GLENDDATE
    MSOPNDATE
    ABC11111
    11111111
    1/2/2015
    4/4/2015
    2/4/2015
    ABC22222
    22222222
    1/5/2015
    4/10/2015
    1/6/2015
    ABC22222
    33333333
    1/5/2015
    4/10/2015
    3/5/2015
    This is the SQL minus the between date join.
    SELECT GLORDR.GLORDER, MSORDR.MSORDER, GLORDR.GLSTARTDATE, GLORDR.GLENDDATE, MSORDR.MSOPNDATE
    FROM GLORDR INNER JOIN MSORDR ON (GLORDR.GLSERIAL = MSORDR.MSSERIAL) AND (GLORDR.GLPART = MSORDR.MSPART);

  • Need help in joining the following tables!

    send me the query for how to join the fields from the tables given.
    Important thing is i need all the values of vbeln in output.
    Whether its corresponding values in other fields present or not doesnt matter
            VBELN LIKE VBAK-VBELN,
             VKORG LIKE VBAK-VKORG,
             ERDAT LIKE VBAK-ERDAT,
             AUGRU LIKE VBAK-AUGRU,
             BEZEI LIKE TVAUT-BEZEI,
             BSTDK LIKE VBKD-BSTDK,
             BSTDK_E LIKE VBKD-BSTDK_E,
             BSTKD LIKE VBKD-BSTKD,
             KDKG2 LIKE VBKD-KDKG2,
             KONDA LIKE VBKD-KONDA,
             MATNR LIKE VBAP-MATNR,
             SPART LIKE VBAP-SPART,
             KONDM LIKE VBAP-KONDM,
             WAERK LIKE VBAP-WAERK,
             NETWR LIKE VBAP-NETWR,
             KWMENG LIKE VBAP-KWMENG,
             VKAUS LIKE VBAP-VKAUS,
             MVGR1 LIKE VBAP-MVGR1,
             MVGR2 LIKE VBAP-MVGR2,
             MVGR3 LIKE VBAP-MVGR3,
             MVGR4 LIKE VBAP-MVGR4,
             MVGR5 LIKE VBAP-MVGR5,
             KUNNR LIKE VBPA-KUNNR,
             POSTCODE1 LIKE ADRC-POST_CODE1,
             POBOX LIKE ADRC-PO_BOX,
             NAME1 LIKE ADRC-NAME1,
             NAME2 LIKE ADRC-NAME2,
             CITY1 LIKE ADRC-CITY1,
             CITY2 LIKE ADRC-CITY2,
             COUNTRY LIKE ADRC-COUNTRY,
             STREET LIKE ADRC-STREET,
             STRSUPPL1 LIKE ADRC-STR_SUPPL1,
             STRSUPPL2 LIKE ADRC-STR_SUPPL2,
             STRSUPPL3 LIKE ADRC-STR_SUPPL3,
             NRART LIKE TPAR-NRART,
             VTEXT1 LIKE TPART-VTEXT,
             PARVW LIKE TPART-PARVW,
             BEZE_I LIKE TVLVT-BEZEI,
             VTEXT LIKE V_T178-VTEXT,
             V_TEXT like V_T188-VTEXT,
             BEZEI1 LIKE TVM1T-BEZEI,
             BEZEI2 LIKE TVM2T-BEZEI,
             BEZEI3 LIKE TVM3T-BEZEI,
             BEZEI4 LIKE TVM4T-BEZEI,
             BEZEI5 LIKE TVM5T-BEZEI,
             VTEXT2 LIKE TVKGGT-VTEXT,
             SMTP_ADDR LIKE ADR6-SMTP_ADDR,

    hi there,
    i want to fetch data from all the fields i ahve given here .It will be a join statement.
    the important thing is I need all the values of vbeln in leftside
    as output.

  • Need help setting up email on 10g

    Okay, so I've run the utlmail.sql and the prvtmail.plb and it successfully completed. From what I understand I now need to do something like
    alter system set smtp_out_server = '<ip-address:port' scope=Both;
    My question is, how do I know what to put for the ip-address:port?
    Another website describes configuring the SMTP_OUT_SERVER parameter like this......
    alter system set SMTP_OUT_SERVER='mail.yourdomain.com' scope=spfile;
    What would I use for mail.yourdomain.com?
    Edited by: user632088 on May 24, 2010 2:25 PM

    Well, I've got a 10g database on my home computer, but I don't exactly have a website or domain. My email account is with att/yahoo. I'm building an oracle application which will email out to a specified email address from a pl/sql procedure. What should I use for the SMTP_OUT_SERVER? The domain name for when I'm actually in my email or is it some IP address?

  • Need help please, Join Tracks Greyed Out.

    Can someone please help with ther following information.
    When I want to burn an audiobook from CD into itunes and try to use the "join tracks" command from the advanced menu it is greyed out and can't be used.
    Can someone please tell me how to sort this out, plus as soon as I load i CD itune starts to import even though I have it set in preff not to do so.
    Again any help please to stop this happening.
    Many thanks

    *When I want to burn an audiobook from CD into itunes and try to use the "join tracks" command from the advanced menu it is greyed out and can't be used.*
    Are you highlighting the tracks you want to join before you go to Advanced>Join CD tracks? the function will be dimmed until a selection is made.
    *as soon as I load i CD itune starts to import even though I have it set in preff not to do so.*
    Open iTunes and go to Edit>Preferences>Advanced>Importing and change the setting in the drop down menu beside "On CD insert" from "Import CD" to one of the other settings such as "Show CD", "Begin Playing" or "Ask to Import CD"

  • Need help in join

    hi,
    Following are my columns data in same table,
    Value1 Value2
    1 1
    2 2
    3 4
    1 3
    My output sould be as like follows
    value
    1
    2
    3
    4
    so please help me on this logc by proving sample query

    Hey or in other way i will explain my requirment,
    i have two reslutset,
    result set A and result set b. i want to join both the result set and bring the output as follows.
    resultA
    1
    2
    3
    1
    resultB
    1
    2
    3
    4
    ned to join these two results and bring the out put as follows
    result:
    1
    2
    3
    4
    i given my requirement in last post bit wrongly, the above requirement is correct. can u pls help me now

  • Need help tuning join in slow query

    Hi all,
    I have the following issue to tune the below join condition in my query below:
    SELECT PO.COMPANY,
    PO.UPDATE_DATE,
    PO.EXTENDED_AMT,
    PO.LOCATION,
    ICLOCATION.R_NAME AS LOCATION_DESC,
    PO.VENDOR,
    AP.VENDOR_VNAME,
    MAJOR.DESCRIPTION AS MAJOR_DESC,
    MINOR.DESCRIPTION AS MINOR_DESC,
    CASE po.purch_majcl
    WHEN ' '
    THEN 'NONE'
    ELSE po.purch_majcl
    END AS PURCH_MAJ,
    CASE po.purch_min
    WHEN ' '
    THEN 'NONE'
    ELSE po.purch_min
    END AS PURCH_MIN,
    CASE po.manuf_code
    WHEN ' '
    THEN 'NO MFG'
    ELSE po.manuf_code
    END AS MANUF_CODE,
    CASE po.manuf_nbr
    WHEN ' '
    THEN 'NONE'
    ELSE po.manuf_nbr
    END AS MANUF_NBR,
    CASE po.manuf_division
    WHEN ' '
    THEN 'NONE'
    ELSE po.manuf_division
    END AS MANUF_DIV,
    CASE po.agreement_ref
    WHEN ' '
    THEN 'NONE'
    ELSE PO.AGREEMENT_REF
    END AS AGRMT_REF,
    /* ITEMLOC IS REQUIRED TO GET TO ICCACATEGORY */
    CASE po.item_type
    WHEN 'I'
    THEN ICCATEGORY.INV_ACCT_UNIT
    ELSE MMDIST.ACCT_UNIT
    END AS ACCT_UNIT,
    CASE po.item_type
    WHEN 'I'
    THEN ICCATEGORY.GL_CATEGORY
    ELSE to_char(MMDIST.ACCOUNT)
    END AS ACCOUNT,
    /* ITEMLOC IS REQUIRED TO GET TO ICCACATEGORY */
    PO.ITEM_TYPE,
    PO.ITEM,
    PO.DESCRIPTION AS ITEM_DESC,
    PO.ENT_REC_UOM,
    PO.ENT_RUOM_MULT,
    PO.ENT_REC_QTY,
    PO.ORIG_UNIT_CST,
    PO.MATCH_UNIT_CST,
    PO.PO_NUMBER,
    PO.PO_LINE_NBR,
    PO.QTY_TO_PROC,
    PURCHORDER.PO_DATE,
    PURCHORDER.BUYER_CODE,
    BUYER.R_NAME AS BUYER_NAME
    FROM LAW.PURCHORDER, LAWS81.BUYER,
    LAW.ICLOCATION, LAW.APVENMAST,
    LAW.PO LEFT JOIN LAW.MMDIST
    ON (PO.COMPANY = MMDIST.COMPANY
    AND PO.LOCATION = MMDIST.LOCATION
    AND PO.PO_NUMBER = MMDIST.DOC_NUMBER
    AND PO.PO_RELEASE = MMDIST.DOC_NBR_NUM
    AND PO.PO_CODE = MMDIST.PO_CODE
    AND PO.PO_LINE_NBR = MMDIST.LINE_NBR
    AND MMDIST.SYSTEM_CD = 'PO'
    AND MMDIST.DOC_TYPE = 'PT'
    AND MMDIST.COMPONENT_SEQ = 0
    AND MMDIST.AOC_CODE = ' ')
    /* 1st JOIN TO ITEMLOC */
    LEFT JOIN LAW.ITEMLOC
    ON PO.COMPANY = ITEMLOC.COMPANY
    AND PO.LOCATION = ITEMLOC.LOCATION
    AND PO.ITEM = ITEMLOC.ITEM,
    /* 2nd JOIN from ITEMLOC to ICCATEGORY */
    /* It should use the ITEMLOC join from above */
    /* creating cartesian product with itemloc */
    LAW.ITEMLOC LEFT JOIN LAW.ICCATEGORY
    ON ITEMLOC.COMPANY = ICCATEGORY.COMPANY
    AND ITEMLOC.LOCATION = ICCATEGORY.LOCATION
    AND ITEMLOC.GL_CATEGORY = ICCATEGORY.GL_CATEGORY,
    /* need to get to ICCATEGORY table using 2nd JOIN condition above */
    LAW.PO LEFT JOIN LAW.MAJOR
    ON PO.PURCH_MAJ = MAJOR.MAJOR_CLASS
    AND MAJOR.CLASS_TYPE = 'P'
    LEFT JOIN LAW.MINOR
    ON PO.PURCH_MAJCL = MINOR.MAJOR_CLASS
    AND PO.PURCH_MINCL = MINOR.MINOR_CLASS
    AND MINOR.CLASS_TYPE = 'P'
    WHERE PO.COMPANY = PO.COMPANY
    AND PO.PO_NUMBER = PO.PO_NUMBER
    AND PO.PO_RELEASE = PO.PO_RELEASE
    AND PO.PO_CODE = PO.PO_CODE
    AND PO.PO_LINE_NBR = PO.LINE_NBR
    AND PO.COMPANY = ICLOCATION.COMPANY
    AND PO.LOCATION = ICLOCATION.LOCATION
    AND PO.VENDOR = APVENMAST.VENDOR
    AND PO.COMPANY = PURCHORDER.COMPANY
    AND PO.PO_CODE = PURCHORDER.PO_CODE
    AND PO.PO_NUMBER = PURCHORDER.PO_NUMBER
    AND PO.PO_RELEASE = PURCHORDER.PO_RELEASE
    AND PURCHORDER.BUYER_CODE = BUYER.BUYER_CODE
    AND PO.R_STATUS = 1
    AND PO.ENT_REC_QTY > 0
    This query runs very slow and we cannot change the code to add or modify indexes. We need to join the 2nd table to the third table with optimized performance. How can I tune this slow running query with the best join conditions?
    Thanks

    I want to join the OS_LOCN_CURR_STK table with the
    OT_PO_ITEM table , such that all items in
    OS_LOCN_CURR_STK are displayed.
    If you want all items in OS_LOCN_CURR_STK to be returned, use an OUTER JOIN on the columns joining the 2 tables.

  • Need help w. connecting to oracle 10g express

    I have been having extreme difficulty with connecting to oracle 10g express edition. what do I put in at the SQL > prompt to access sql plus? Are there first some env. variables which I need to set? Sorry for the basic "newbie" question about this.

    what do I put in at the SQL > prompt to access sql plus?You may trySQL> conn / as sysdbabut don't use this one for your application data, create your own user(s) instead.
    Are there first some env. variables which I need to set?Depends... what's your operating system, and are you running sqlplus from SQL command line or from OS prompt ?

Maybe you are looking for

  • Error code 0xe0ef0003, No "BOOTMGR" after a system restore, no disc/self system.

    So ... my HP Pavilion dv7 NB, that I've owned just a mere two days shy of three years, decided to get extremely lazy late last night. I have malware programs in place, strong security, etc. but I suppose that something might have slipped in ... but u

  • After running Adobe Download assistant I get a warning window.

    It took all day to run the Adobe Download Assistant for Adobe CS6 Master Collection. When the .dmg finished downloading, up popped the warning window, "MasterCollection_CS6_invalid schecksum. I tried to open the .dmg from the folder to which I downlo

  • Worflow container elements not populating

    Hi, I am using a simple method and populating certain parameters of the method. in stand alone from swo1 the method populates the container element. This method is then called from a task in workflow. The problem I face is that the workflow container

  • File sharing only works in one direction

    I have a 2011 iMac and a 2012 rMBP. File sharing is turned on on both machines, but when I try to connect to the MBP from the iMac, it refuses the connection. I've noticed that it works if I check that box for my account for Windows file sharing (the

  • Stats Not getting imported while importing partition using DATAPUMP API

    Hi, I am using datapump API for exporting a partition of a table and the importing the partition into table on another DB. The data is getting imported but i could the partition stats are not getting imported. I am using TABLE_EXISTS_ACTION = APPEND.