Join Between W_PERSON_F and W_POSITION_D

Hi,
I want to join W_PERSON_F fact table and W_POSITION_D dimension table. Database: Siebel DB.
Is there any direct join or we want to join through some other table?
Thanks,
Satheesh

As per my knowledge there is no direct join between w_person_f and w_position_d
but you can create an alisa of w_person_d as contact(w_person_d) and join with w_person_f
as below
contact(w_person_d).row_wid = w_person_f.contact_wid
please mark the ans if it is correct.
Thanks

Similar Messages

  • Join between gl_import_references and ap_invoice_distributions_all in R12

    Please advice me how to join gl_import_references and ap_invoices_distribution_all in R12. I have understanding of join between gl_import_references and ap_invoices_all, but I am not clear how to join ap_invoice_distriutions_all to gl_import_references.
    Thanks

    Hi,
    we don't have direct link for GL_JE_LINES and AP_INVOICE_DISTRIBUTIONS_ALL.
    First join AP_INVOICE_DISTRIBUTIONS_ALL and GL_CODE_COMBINATIONS then link to GL_JE_LINES.
    Please see below eg:
    SELECT *
    FROM gl_code_combinations gcc,
    ap_invoice_distributions_all apd,
    gl_je_lines gjl
    WHERE gcc.code_combination_id = apd.dist_code_combination_id
    AND gcc.code_combination_id = gjl.code_combination_id;
    your case use apd.dist_code_combination_id instead of apd.po_distribution_id (>
    and apd.po_distribution_id = GJL.CODE_COMBINATION_ID Add -----------Problem here-----------)
    I hope this will help to you.
    Thanks,
    Prasad Raju

  • Join Between PO and Requisition

    Hi,
    I am trying to do a report in Disco (4.1.48) on all the Open Po's associated Req with the Req Amount and Amount receipted.
    I can get the info for the Req fine and the info for the PO's fine.
    But I cannot get the join between the Po and Req to work so all the data pulls onto one sheet.
    I keep getting an error "Join configuration cannot resolved as one detail folder uses non aggregated items"
    I have a Join between Po Distributions All.Req Distribution Id and Po Req Distributions All.Distribution Id
    Any Help Greatly appreciated
    Mick

    Hi,
    Personally, I would avoid custom folders. It sounds as though you are using a master and two detail folders in your report, and you are using an aggregation function (e.g. SUM) on an item in one of the detail folders. You may be able to resolve this by changing (using Discoverer Administrator) the join on the other detail folder to be a one-to-one join.
    Rod West

  • Best Practice - Outer Join between Fact and Dim table

    Hi Gurus,
    Need some advice on the below scenario
    I have an OOTB subject area and we have around 50-60 reports based on it. The related subject area Fact and Dim1 table are having inner join.
    Now I have a scenario for one report where outer join has to be implemented between Fact and Dim1. Here I am against changing the OOTB subject area join as the outer join will impact the performance of other 50-60 reports.
    Can anyone provide any inputs on what is the best way to handle this scenario?
    Thanks

    Ok. I tried this:
    Driving table : Fact, Left outer join -- didnt work.
    Driving table: Dimension D left outer join -- didnt work either
    In either the case, I see physical query as D left outer Join on Fact F. and omitting the rows.
    And then I tried this -
    Driving table: Fact, RIght outer join.
    Now, this is giving me error:
    Sybase][ODBC Driver]Internal Error. [nQSError: 16001] ODBC error state: 00000 code: 30128 message: [Sybase][ODBC Driver]Data overflow. Increase specified column size or buffer size. [nQSError: 16011] ODBC error occurred while executing SQLExtendedFetch to retrieve the results of a SQL statement. (HY000)
    I checked all columns, everything matched with database table type and size.
    I am pulling Fact.account number, Dimension.account name, Fact.Measures. I am seeing this error each time I pull Fact.Account number.

  • Select Query and Join Between int and Numeric(22)

    I have two tables
    tablea
    Field1 int
    tableb
    Field1 Numeric(22)
    I know this design is wrong but this is what I have ?
    tablea contains about 12M records
    Field1 in tablea is one to one related to Field1 in tableb
    Now I have Select Query
    Select tablea.* from tablea,tableb where tablea.field1=tableb.field1 and tableb.field2 > somrthing
    Query here is
    Does Join Between
    int type

    Yes, avinash said rightly.
    there is another way bit diffict.
    use the indexes properly as available in the mseg table and mkpf table even then it is diffcult
    else try using BAPI.
    some bapi will give the entire details of the MATERAIL DOCUMENT
    go to BAPI explorer tcode BAPI.
    where you can find the BAPI name like the 'GET_LIST'.
    Try this.
    hope this will serve your purpose.
    Thanks and regards
    Ramchander Rao.K

  • Join between Oracle and non-Oracle Database

    We are working at a project with the follow architecture:
    - 5 Databases (3 Oracle, 1 Sybase and 1 DB2);
    - Session Bean like Session Facade Pattern;
    - Entity Bean (BMP);
    - OC4J (Oracle Container for J2EE);
    The case is that we cannot make join between tables of different bases, for example, join with one table of Oracle and one other of DB2, therefore the customer does not possess tool midleware for this.
    The idea that appeared was: we make a query in table XXX of Oracle and return a HashTable with its respective VO�s and Keys (PKs from the first query that will serve of base for the second query), later we have access the DB2 that one second collection would return, to inside make join of the application.
    The problem is that with this solution, we will have fall in the performance. And we do not know if it is the best form.
    Do you have any idea???
    Thanks,
    Eric Sander

    Hi,
    If you have different databases then the join has to be done in the VM (either by the appserver or by you).
    If you want to do it yourself, I would try the following:
    -write one DAO per business object (at least one per database)
    -this DAO contains the specifics of its database
    -return a hashtable of keys and VOs from one DAO (as you say you do?)
    -in the other DAO, add a method "joinWith ( Hashtable foreignKeys )" that will return the join's result
    -implement the method along these lines:
    1. retrieve the candidate rows from the second DAO's tables (1 query execution)
    2. put the keys in a new Hashtable, say "candidateKeys" (meaning 1 iteration over all results)
    3. iterate over all elements of foreignKeys (1 iteration)
    4. for each element, check if a key exists in "candidateKeys" (1 hash lookup, very fast)
    5. add any such row to the result
    This is called a hash join (Oracle does it internally if you do a join).
    It is the fastest algorithm to do joins.
    Best,
    Guy
    http://www.atomikos.com - JTA transaction manager

  • Join between SO and AR tables in Oracle Apps 11.0.3

    Hello,
    I am new to Order Management. Can anyone please suggest join between SO Tables and Receivables tables in Oracle Apps version 11.0.3.
    I am working on an Invoicing error during Autoinvoice Import Program and I am doing workaround on this issue. This error comes for specific SO only. The error causes all invoices for a org not be imported into AR. To find out a solution for the same we run Autoinvoice into batches by Sales Order using a process of elimination to determine the offending So transaction. From these offending SO then we determine the customer for these SO's. And then find out if there are any other accounts that have relationships with the offending customer and then turn off that relationship. Then rerun Autoinvoice for that SO. Most of the time SO will be imported successfully. Can anyone please suggest what must be the issue in Autoinvoice Program as I am new this.
    Thank You.
    Regards,
    Meghana

    Hi again;
    I found this please also check this:
    Price List Migration from 11.0.3 to 11.5.10/R12.
    Regard
    Helios

  • Inner join between OBOE and OBOT

    Hi all,
    I am trying to query these tables, but for all the system displays data from these tables in only one windows, MSQL does not inner join this tables.
    So, we are looking for the relation in these two tables, or between OBOE and JDT1/OJDT would be enought.
    Thanks and regards,
    Javier Zapata

    Hi,
    i'm not sure but you can try to use the table BOT1 (Bill of Exchange Transactions details).
    Here you can find the field AbsEntry (related to the table OBOT) and the field BOENumber (related to OBOE table).
    Hope this helps
    Regards,
    Fabio Salucci

  • Join between hz_cust_site_uses_all and pa_agreements_all table

    What is the joining condition between hz_cust_site_uses_all and pa_agreements_all table? How hz_cust_site_uses_all and pa_agreements_all table can be joined?

    Hi,
    What happens if you simply use a DISTINCT clause, something like:
    SELECT DISTINCT pa.customer_id ,hcs.cust_acct_site_id
               FROM hz_cust_acct_sites_all hca,
              hz_cust_site_uses_all hcs,pa_agreements_all pa
              WHERE hcs.cust_acct_site_id = hca.cust_acct_site_id
            AND hca.cust_account_id       = pa.customer_id
    Thanks &
    Best Regards,

  • Creating a Join between VBAK and EKKO

    Hello
    I have to prepare a Sales Report for Third Party Orders....
    The Report takes fields from EKKO (PO DOC Header) and VBAK (Sales Order Doc).
    The Problem is that I cannot find anything to join these two Tables. The BSTNK Field in VBAK does not match with the EBELN field in EKKO.
    Anticipating a quick reply
    Thanks in advance
    Zubin Kurian

    Hi,
    You can use matnr as key.
    Look for the Keyfileds between two tables.If you can't found any key fields you can go for FM.
    Check it once.
    Reg
    Pra

  • Join between AP_bank_account_uses_all and Po_vendors in r12

    Hello,
    Actually yesterday i posted the same question, but it was deleted. I really dont know the reason though.
    But, i have a cursor that has these conditions that run in 11i.
    Can anyone please help me to re-write the following query with the joins in r12.
    AP_BANK_ACCOUNTS.BANK_BRANCH_ID = AP_BANK_BRANCHES.BANK_BRANCH_ID
    AND AP_BANK_ACCOUNT_USES_ALL.VENDOR_ID = PO_VENDORS.VENDOR_ID
    AND AP_BANK_ACCOUNT_USES_ALL.VENDOR_ID = PO_VENDOR_SITES_ALL.VENDOR_ID(+)
    AND AP_BANK_ACCOUNT_UESES_ALL.VENDOR_SITE_ID = PO_VENDOR_SITES_ALL.VENDOR_SITE_ID(+)
    Truly appreciate your help.
    Thank you in advance.
    Edited by: 933951 on May 15, 2012 2:09 PM

    Please see these links.
    Re: Supplier Bank Info in AP
    Re: APPS (Vendor Bank Details)
    http://erpconsultingstore.com/19.html
    http://avkoracleapps.blogspot.ca/2011/07/query-for-supplier-bank-details.html
    http://oracleappsquery.wordpress.com/category/query/page/3/
    Thanks,
    Hussein

  • Joins between transactions and sales order tables?

    Hi all,
    SELECT ott.NAME,
                 msi.organization_id
      FROM apps.mtl_material_transactions mmt,
                apps.mtl_system_items_kfv msi,
                apps.oe_order_headers_all ooha,
                apps.oe_order_lines_all oola,
                apps.oe_transaction_types_tl ott
    WHERE     mmt.transaction_type_id = 12
           AND mmt.inventory_item_id = msi.inventory_item_id
           AND mmt.organization_id = msi.organization_id
           AND ooha.header_id = oola.header_id
           AND oola.line_id = mmt.trx_source_line_id
           AND oola.inventory_item_id= msi.inventory_item_id
           AND ooha.order_type_id= ott.transaction_type_id
           AND mmt.inventory_item_id = 1234
           AND msi.organization_id = 20
    And i don't have inventory item id with this transaction_type_id = 12

    Transaction_type_id 12 is a "Receive from Intransit".  I don't think those will join to sales orders.  What are you trying to accomplish?

  • Dynamic SQL Joining between tables and Primary keys being configured within master tables

    Team , Thanks for your help in advance !
    I'm looking out to code a dynamic SQL which should refer Master tables for table names and Primary keys and then Join for insertion into target tables .
    EG:
    INSERT INTO HUB.dbo.lp_order
    SELECT *
    FROM del.dbo.lp_order t1
    where not exists ( select *
    from hub.dbo.lp_order tw
    where t1.order_id = t2.order_id )
    SET @rows = @@ROWCOUNT
    PRINT 'Table: lp_order; Inserted Records: '+ Cast(@rows AS VARCHAR)
    -- Please note Databse names are going to remain the same but table names and join conditions on keys
    -- should vary for each table(s) being configured in master tables
    Sample of Master configuration tables with table info and PK Info :
    Table Info         
    Table_info_ID    Table_Name    
    1        lp_order    
    7        lp__transition_record    
    Table_PK_Info        
    Table_PK_Info_ID    Table_info_ID    PK_Column_Name
    2                1    order_id
    8                7    transition_record_id
    There can be more than one join condition for each table
    Thanks you !
    Rajkumar Yelugu

    Hi Rajkumar,
    It is glad to hear that you figured the question out by yourself.
    There's a flaw with your while loop in your sample code, just in case you hadn't noticed that, please see below.
    --In this case, it goes to infinite loop
    DECLARE @T TABLE(ID INT)
    INSERT INTO @T VALUES(1),(3),(2)
    DECLARE @ID INT
    SELECT @ID = MIN(ID) FROM @T
    WHILE @ID IS NOT NULL
    PRINT @ID
    SELECT @ID =ID FROM @T WHERE ID > @ID
    So a cursor would be the appropriate option in your case, please reference below.
    DECLARE @Table_Info TABLE
    Table_info_ID INT,
    Table_Name VARCHAR(99)
    INSERT INTO @Table_Info VALUES(1,'lp_order'),(7,'lp__transition_record');
    DECLARE @Table_PK_Info TABLE
    Table_PK_Info_ID INT,
    Table_info_ID INT,
    PK_Column_Name VARCHAR(99)
    INSERT INTO @Table_PK_Info VALUES(2,1,'order_id'),(8,7,'transition_record_id'),(3,1,'order_id2')
    DECLARE @SQL NVarchar(MAX),
    @ID INT,
    @Table_Name VARCHAR(20),
    @whereCondition VARCHAR(99)
    DECLARE cur_Tabel_Info CURSOR
    FOR SELECT Table_info_ID,Table_Name FROM @Table_Info
    OPEN cur_Tabel_Info
    FETCH NEXT FROM cur_Tabel_Info
    INTO @ID, @Table_Name
    WHILE @@FETCH_STATUS = 0
    BEGIN
    SELECT @whereCondition =ISNULL(@whereCondition+' AND ','') +'t1.'+PK_Column_Name+'='+'t2.'+PK_Column_Name FROM @Table_PK_Info WHERE Table_info_ID=@ID
    SET @SQL = 'INSERT INTO hub.dbo.'+@Table_Name+'
    SELECT * FROM del.dbo.'+@Table_Name+' AS T1
    WHERE NOT EXISTS (
    SELECT *
    FROM hub.dbo.'+@Table_Name+' AS T2
    WHERE '+@whereCondition+')'
    SELECT @SQL
    --EXEC(@SQL)
    SET @whereCondition = NULL
    FETCH NEXT FROM cur_Tabel_Info
    INTO @ID, @Table_Name
    END
    Supposing you had noticed and fixed the flaw, your answer sharing is always welcome.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Join between ekpo and lips

    Hi,
    this join is syntactically correct but because ekpo-ebelp is the type numc(5) and lips-vgpos is the type numc(6) it's not working.
    Example: ekpo-ebelp = 00010
                   lips-vgpos = 000010
    What should i do? Please someone help me.
    Thank you.
    SELECT SINGLE e~ebelp e~aedat e~matnr e~menge e~netpr  l~lfimg
        INTO CORRESPONDING FIELDS OF it_joindata
        FROM ekpo AS e LEFT JOIN lips AS l ON e~matnr = l~matnr AND
    e~ebeln = l~vgbel AND
    e~ebelp = l~vgpos AND
    l~vbeln = pa_vbeln
        WHERE e~ebeln = pa_ebeln AND e~idnlf = it_file-cod.
    Edited by: Dan M. on Nov 3, 2008 5:14 PM

    Hi Dan,
    You'll have to exclude the line item criteria from the join I'm afraid.
    I'd select both ebelp and vgpos into my internal table and then remove the unwanted ones after the select statement. You'll be able to use offsets to compare the two fields at this stage.
    Darren

  • Different Between In and Join Function of Query

    Hi Team,
    I have confuse for the below query getting different count.
    Version DB :-
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Query:-1
    Getting Count :-3917
    SELECT COUNT (*)
      FROM stg_ser_level_inv_db a, map_stg_gsm_serv b
    WHERE a.account_number_v IN (SELECT account_number_v
                                    FROM map_transaction_number MAP
                                   WHERE MAP.trans_type_v IN ('F', '4'))
       AND a.trans_num_v
                        IN (SELECT trans_num_v
                              FROM map_transaction_number MAP
                             WHERE MAP.trans_type_v IN ('F', '4'))
       AND a.trans_type_v
                         IN (SELECT trans_type_v
                               FROM map_transaction_number MAP
                              WHERE MAP.trans_type_v IN ('F', '4'))
       AND a.acct_no = b.stg_account_number
       AND a.serv_account_number_v= b.stg_serv_link_code
       AND NOT EXISTS (
              SELECT 1
                FROM cb_sub_ar_ap ar
               WHERE ar.account_link_code_n = b.ab_serv_acc_link_code
                 AND ar.bill_cleared_flg_v = 'N'
                 AND ar.trans_num_v IN (SELECT target_trans_num_v
                                          FROM map_transaction_number MAP
                                         WHERE MAP.trans_type_v IN ('F', '4')))--3917why when u IN condition and join condition count is different. please let me know why?
    Thanks for advance ...
    Second :-2 Join Condition
    Total Count :-789948
    select COUNT(*)
        FROM STG_SER_LEVEL_INV_DB A , MAP_STG_GSM_SERV B,MAP_TRANSACTION_NUMBER ARAP_CUR
    WHERE  A.ACCOUNT_NUMBER_V = ARAP_CUR.ACCOUNT_NUMBER_V
    AND A.TRANS_NUM_V  = ARAP_CUR.TRANS_NUM_V
    AND A.TRANS_TYPE_V = ARAP_CUR.TRANS_TYPE_V
    AND A.ACCT_NO = B.STG_ACCOUNT_NUMBER
    and a.SERV_ACCOUNT_NUMBER_V  = B.STG_SERV_LINK_CODE
    and ARAP_CUR.TRANS_TYPE_V in ('F','4')
    and not exists (select 1 from CB_SUB_AR_AP ar
          where ar.account_link_code_n = B.AB_SERV_ACC_LINK_CODE
          and AR.BILL_CLEARED_FLG_V = 'N'
          and ar.trans_num_v = ARAP_CUR.TARGET_TRANS_NUM_V);---789948

    Hi,
    Whenever you have a problem, please post a complete test script that people can run to re-create the problem and test their ideas. Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data. In this case, data that produced no more than 10 rows of output for each query should be plenty.
    Simplify the problem as much as possible. For example, it looks like both your queries are joining tables a and b the same way. Why not pretend that you have only 1 table, ab, that is the same as the result set of joining a and b? Post CREATE TABLE and INSERT statements for the relevant columns of ab.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    There are several differences between those two queries.
    For one thing, Query 1 is doing a 2-way join between a and b, and then filtering that result set by comparing it to another table (let's call it map). So if a contains 5 rows and b contains 2 rows, the result set will contain at most 5 * 2 = 10 rows. Perhaps only 8 of those 10 rows will have matching rows in map. Note that the number of rows in map, or how many rows in map match rows in a or b doesn't matter. Query 2, on the other hand, is doing a 3-way join of a, b and map, so if map has 100 rows, the result set could have as many as
    (5 * 2) * 100 = 1000 rows. We know that it won't have that many rows, because only 8 out the rows from the a-b join have matching rows in map, but the result set of the 3-way join could still have as many as
    (8) * 100 = 800 rows.
    Since you didn't post test versions of your tables, I'll use tables from the scott schema to illustrate. Scott.dept has 4 rows, only 3 of which match rows in scott.emp, so
    SELECT  d.*
    FROM     scott.dept  d     -- tables a and b in your query play this role
    WHERE     d.deptno  IN (
                      SELECT  e.deptno
                   FROM     scott.emp  e     -- map plays this role in your query
    ;produces 3 rows of output. Exactly how many rows are in emp (that number happens to be 14) and how many of those rows match rows in dept (that happens to be 14, also) doesn't matter; all that matters in the query above is that 3 of the rows in dept have matches. However, the fact that 14 of the rows in emp have matches is important in the query bleow:
    SELECT     d.*
    FROM     scott.dept  d
    JOIN     scott.emp   e  ON  d.deptno  = e.deptno
    ;which produces 14 rows of output.
    Another differece is that Query 1 says that there are 3 conditions that relate table a to map; a given row in a will be included in the result set if any row in map meets condition 1, any row in map meets condition 2, and any row in map meets condition 3. It doesn';t matter if you have to look at 2 or 3 rows in map to meet all those conditions. Query 2 says that a row from a will be included only if there is a single row in map that meets all 3 conditions.

Maybe you are looking for