Parent table of a child table

I am using a child table 'CHILD_T' and in this table the column 'CHILD_FK' is the foreign key and it is pointing to some parent table. In my oracle editor I can see only synonyms but not actual tables. Is there any way to find out the parent table for this child table. Why I am asking this is because , I am getting below error while trying to execute the below script.
Here I think my question is pretty simple but I would like to know how to find a parent table of a child table as I can see only synonyms instead actual tables.
Script :
INSERT INTO CHILD_T ( EM_ID, DFLT_COST_CNTR_TXT, ACCT_TYP_ID, DFLT_ORD_TYP_ID ) VALUES ('abcd', 'NA', '1', '1' );
Error:
SQL Error: ORA-02291: integrity constraint (AFM.USR_PROF_EM_ID) violated - parent key not found.
Any one have any idea your help is well appreciated.

select table_name  from user_constraints where constraint_name  in
    (select r_constraint_name from user_constraints  where constraint_name='YOUR_CONSTARINT_NAME');

Similar Messages

  • SQL Server 2012 Management Studio:In the Database, how to print out or export the old 3 dbo Tables that were created manually and they have a relationship for 1 Parent table and 2 Child tables?How to handle this relationship in creating a new XML Schema?

    Hi all,
    Long time ago, I manually created a Database (APGriMMRP) and 3 Tables (dbo.Table_1_XYcoordinates, dbo.Table_2_Soil, and dbo.Table_3_Water) in my SQL Server 2012 Management Studio (SSMS2012). The dbo.Table_1_XYcoordinates has the following columns: file_id,
    Pt_ID, X, Y, Z, sample_id, Boring. The dbo.Table_2_Soil has the following columns: Boring, sample_date, sample_id, Unit, Arsenic, Chromium, Lead. The dbo.Table_3_Water has the following columns: Boring, sample_date, sample_id, Unit, Benzene, Ethylbenzene,
    Pyrene. The dbo.Table_1_XYcoordinates is a Parent Table. The dbo.Table_2_Soil and the dbo.Table_3_Water are 2 Child Tables. The sample_id is key link for the relationship between the Parent Table and the Child Tables.
    Problem #1) How can I print out or export these 3 dbo Tables?
    Problem #2) If I right-click on the dbo Table, I see "Start PowerShell" and click on it. I get the following error messages: Warning: Failed to load the 'SQLAS' extension: An exception occurred in SMO while trying to manage a service. 
    --> Failed to retrieve data for this request. --> Invalid class.  Warning: Could not obtain SQL Server Service information. An attemp to connect to WMI on 'NAB-WK-02657306' failed with the following error: An exception occurred in SMO while trying
    to manage a service. --> Failed to retrieve data for this request. --> Invalid class.  .... PS SQLSERVER:\SQL\NAB-WK-02657306\SQLEXPRESS\Databases\APGriMMRP\Table_1_XYcoordinates>   What causes this set of error messages? How can
    I get this problem fixed in my PC that is an end user of the Windows 7 LAN System? Note: I don't have the regular version of Microsoft Visual Studio 2012 in my PC. I just have the Microsoft 2012 Shell (Integrated) program in my PC.
    Problem #3: I plan to create an XML Schema Collection in the "APGriMMRP" database for the Parent Table and the Child Tables. How can I handle the relationship between the Parent Table and the Child Table in the XML Schema Collection?
    Problem #4: I plan to extract some results/data from the Parent Table and the Child Table by using XQuery. What kind of JOIN (Left or Right JOIN) should I use in the XQuerying?
    Please kindly help, answer my questions, and advise me how to resolve these 4 problems.
    Thanks in advance,
    Scott Chang    

    In the future, I would recommend you to post your questions one by one, and to the appropriate forum. Of your questions it is really only #3 that fits into this forum. (And that is the one I will not answer, because I have worked very little with XSD.)
    1) Not sure what you mean with "print" or "export", but when you right-click a database, you can select Tasks from the context menu and in this submenu you find "Export data".
    2) I don't know why you get that error, but any particular reason you want to run PowerShell?
    4) If you have tables, you query them with SQL, not XQuery. XQuery is when you query XML documents, but left and right joins are SQL things. There are no joins in XQuery.
    As for left/right join, notice that these two are equivalent:
    SELECT ...
    FROM   a LEFT JOIN b ON a.col = b.col
    SELECT ...
    FROM   b RIGHT JOIN a ON a.col = b.col
    But please never use RIGHT JOIN - it gives me a headache!
    There is nothing that says that you should use any of the other. In fact, if you are returning rows from parent and child, I would expect an inner join, unless you want to cater for parents without children.
    Here is an example where you can study the different join types and how they behave:
    CREATE TABLE apple (a int         NOT NULL PRIMARY KEY,
                        b varchar(23) NOT NULL)
    INSERT apple(a, b)
       VALUES(1, 'Granny Smith'),
             (2, 'Gloster'),
             (4, 'Ingrid-Marie'),
             (5, 'Milenga')
    CREATE TABLE orange(c int        NOT NULL PRIMARY KEY,
                        d varchar(23) NOT NULL)
    INSERT orange(c, d)
       VALUES(1, 'Agent'),
             (3, 'Netherlands'),
             (4, 'Revolution')
    SELECT a, b, c, d
    FROM   apple
    CROSS  JOIN orange
    SELECT a, b, c, d
    FROM   apple
    INNER  JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    LEFT   OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    RIGHT  OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    FULL OUTER JOIN orange ON apple.a = orange.c
    go
    DROP TABLE apple, orange
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Join  a Parent Table with 2 Child table based on a value

    Dear Guru's
    We have a Parent Table and 2 Child table . The Parent Table has a column like seqtype with only 2 possible values C and S . If the Value is C , then the details are available in Child 1 table and if the Value is S then the Details are in Child 2 table
    How can we query the Data from this type of arrangement ? I am little bit confused and hit a road block
    Will the following query will work ?
    Select
    from Parent P , Child C1, Child C2
    where P.seqtype = C1.Seqtype
    and P.seqtype = C2.Seqtype
    With Warm Regards
    ssr

    You didn't mention the column names in two child tables. Whether the columns are same in 2 tables of these are different.
    If the columns are same better to go and change your design to have only one child table. However if stiil business stops you having one table you can use UNION ALL (Assuming you want to fetch same column information from two child tables) like below:
    SELECT p.col1
          ,c1.col2
          ,c1.col3
          ,c1.col4
      FROM parent     p
          ,child      c1
    WHERE p.seqtype = c1.seqtype
    UNION ALL
    SELECT p.col1
          ,c2.col2
          ,c2.col3
          ,c2.col4
      FROM parent     p
          ,child      c2
    WHERE p.seqtype = c2.seqtype Regards
    Arun

  • How to find out master tables and concern child tables

    Hi,
    my schema contains 219 tables. I got this result by using query "selct count(*) from user_tables".
    Now i need to know about master tables and concern child tables from these 219 tables.
    please guide me.
    Thanks and Regards,
    Venkat

    What about this one!!!
    select a.owner,a.table_name,a.column_name,
         '------------------>' as POINTS_TO,b.owner,b.table_name,b.column_name
    from dba_constraints c
         join dba_cons_columns a on ( c.constraint_name = a.constraint_name and c.owner = a.owner)
         join dba_cons_columns b on ( c.r_constraint_name = b.constraint_name and c.r_owner = b.owner)
    where  (a.table_name = '&table' and (a.owner='&owner'))  -- foreign key
    --     and (b.table_name = '&table' and (b.owner='&owner') )  -- source key
         and ( c.constraint_type='R' )
    order by a.table_namecomment and uncomment one between theese two lines to choose the direction.
         (a.table_name = '&table' and (a.owner='&owner'))  -- foreign key
    --     and (b.table_name = '&table' and (b.owner='&owner') )  -- source keyBye Alessandro
    Edited by: Alessandro Rossi on 22-ott-2008 10.40

  • Delete parent without entries in child table

    Hi
    I have two table with millions of records. The child table has referential integrity with the parent and the foreign-key is indexed.
    I must delete all the parent rows with no corresponding entries in child table.
    What is the faster way?

    You might test using DML error logging so you don't have to 'find' the rows. Just delete them all and let Oracle put the error rows in the log table.
    Try this using the sample DDL you provided above:
    exec DBMS_ERRLOG.CREATE_ERROR_LOG ('CHILD')
    ALTER TABLE ERR$_CHILD DROP COLUMN C_ID;
    ALTER TABLE ERR$_CHILD DROP COLUMN C_P_ID;
    delete from parent
    LOG ERRORS INTO err$_child ('DELETE') REJECT LIMIT UNLIMITED;
    The drawback is the space taken for the required columns in the log table for child row data that had a parent. The two ALTER statements above DROP the actual 'child' columns from the log table after it is created to save space but the required fields will still be populated.
    The DELETE will be successful and will remove 'parent' rows with NO children.

  • On insert into parent table insert into child tables

    hi all,
    please suggest me an idea for below scenario in plsql
    i have a main table where every day 10k records are inserted,
    now when ever the main table gets inserted the same records should inserted into two other child tables.
    main table will have 20 columns and two child tables will have 10 each columns with one common column in all three tables.
    suggest me if a trigger is best or a procedure is best for this if possible with a solution.
    thanks in advance

    look at INSERT ALL
    sample from http://psoug.org/reference/insert.html
    INSERT ALL
      INTO ap_cust VALUES (customer_id, program_id, delivered_date)
      INTO ap_orders VALUES (order_date, program_id)
      SELECT program_id, delivered_date, customer_id, order_date
        FROM airplanes;

  • Need to delete data from main table and all child tables ...

    hi all,
    i need to delete rows pertaining to perticular table and all the child
    tables basing on certain code.i need to write a procedure to which i will
    pass the table name and code..
    like del_info(tab_name,code)
    example:
    suppose if i call as del_info(clients,760)
    the procedure should delete all info reg. code 760
    and the table clients and also all the child records of this table
    perting to code 760.
    simply .. i need to delete from the table passed and also
    all the child tables down the heirarchy regarding certain code ...
    help ???
    Ravi Kumar M

    Hi,
    Depends how you defined referential integrity.
    You can use ON DELETE CASCADE, please read the next doc http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/clauses3a.htm#1002692
    Hope this help you,
    Nicolas.

  • Master table with two child tables in ADF Framework

    Hi,
    I'm trying to implement single master with two detail tables using oracle adf framework of Jdev 11.1.1.4.0. I'm able to do single master-detail by using view link but unable to achieve nested details block i.e., master with nested child blocks.
    I created Query based view object of Master and two query based view objects as details. Then I created two view link for master with first child and another view link for master with second child. Even then in my data controls I see as two different components which is incorrect.
    Please let me know how to create a data control for an example shown below:
    Fruits [MASTER]
    --- Details of Fruits as adf table
    -- Apples [FIRST CHILD]
    ---- Details of Apples as adf table
    -- Oranges [SECOND CHILD]
    ---- Details of Oranges as adf table
    Regards,
    Amar.

    You need two viewLinks
    Fruits->Apples
    Fruits->Oranges
    Then in the data model you pick the Fruits entry that has:
    Fruits
    |--->Apples
    You stand on Fruits and you shuttle the Oranges to be under it from the left.
    If you'll use the default HR schema you'll see this type of relation for Employees:
    https://blogs.oracle.com/shay/entry/master_with_two_details_on_the

  • UPDATE of column in parent only UPDATEs first row in DENORMALIZED child table

    In the Repositiry in Designer 6i, I denormalized DESC1 column to
    pull the value of DESC1 in the parent table. The child table has
    four (4) records with matching foreign keys. When I go into my
    Form and update DESC1 in the parent, only the first of the four
    child DESC1's are updated. Any ideas?
    Thanks,
    Dan

    Dan,
    Sorry, known bug, but should be fixed in next release.
    Have a look via metalink at article <Note:156833.1> this
    explains in detail the problem and a fix.
    The bug no was <1974122>
    regards
    David

  • Parent - child tables foreign key relation ship

    Hi All,
    we have 600 hundred tables ..i would like to print a hierarchial tree based on the foreigh key relathionship
    i tried my best but i couldnt.
    parent table
    child table 1
    childtable3
    child table 2
    and so
    Can somebody help me out with a query?
    Thanks,
    kt

    CREATE OR REPLACE FUNCTION get_child_tables (
    ptable VARCHAR2,
    powner VARCHAR2 DEFAULT 'SCOTT',
    plevel NUMBER DEFAULT 10
    RETURN stringarray
    -- -- create this ON SQL*PLUS "CREATE OR REPLACE TYPE STRINGARRAY AS TABLE OF VARCHAR2(50);"
    -- AUTHID CURRENT_USER
    PIPELINED
    AUTHOR DATE VERSION COMMENTS
    ======================================================================================
    [email protected] 26-OCT-2009 1.0 Developed to ease developers effort to find Nth level of Referential integrity
    ======================================================================================
    -- PURPOSE -> To find PARENT=> CHILD relational TABLE(S) in Oracle upto a depth max N Level.
    --SYNTAX TO USE
    SELECT * FROM TABLE( get_child_tables('DEPT','SCOTT',3)); Store this query in a file for your use
    SELECT * FROM TABLE( get_child_tables('EMPLOYEE')); Store this query in a file for your use
    -- RESULTS looks as below
    --1 => DEPT
    --2 => EMP
    --2 => EMP2
    --3 => EMP_CHILD
    --3 => EMP2_CHILD
    -- and so on
    --This can be leveraged to use in any oracle database REGION 10g having and above.
    --This FUNCTION gives formatted result of the Oracle 10g Hierarchical query result coded in the cursor
    --to find MASTER => CHILD relational TABLE(S) upto a depth max 10 Level.
    --The result of the PIPELINED function can be retrieved using Oracle new operator
    --TABLE(array name) in SQL query.
    --Due to the AUTHID CURRENT_USER compiler directive any user can use based on his/her access privileges on the database.
    --GRANT EXECUTE ON SCOTT.get_child_tables TO PUBLIC;
    --CREATE OR REPLACE PUBLIC SYNONYM get_child_tables FOR SCOTT.get_child_tables;
    IS
    atname stringarray := stringarray ();
    -- create this ON SQL*PLUS CREATE OR REPLACE TYPE STRINGARRAY AS TABLE OF VARCHAR2(50);
    vlevel NUMBER;
    vtname VARCHAR2 (50);
    nindex NUMBER := 0;
    bprocessed BOOLEAN := FALSE;
    CURSOR c1 (powner_in IN VARCHAR2, ptable_in VARCHAR2, plevel_in NUMBER)
    IS
    SELECT LEVEL, LPAD (' ', (LEVEL - 1) * 2, ' ') || pt AS "TNAME"
    FROM (SELECT a.owner w1, a.table_name pt, a.constraint_name c1,
    a.r_constraint_name r1, b.owner w2, b.table_name ct,
    b.constraint_name c2, b.r_constraint_name r2
    FROM all_constraints a, all_constraints b
    WHERE a.constraint_name = b.r_constraint_name(+)
    AND a.owner = b.owner(+)
    AND a.owner =
    UPPER (powner)
    -- Change Owner here while testing
    --AND A.r_constraint_name IS NULL
    AND a.constraint_type IN ('P', 'R')) v1
    START WITH pt =
    UPPER
    (ptable)
    -- Change your master table here while testing the QUERY
    CONNECT BY PRIOR ct = pt AND LEVEL <= plevel;
    -- Change lavel here while testing
    BEGIN
    atname.EXTEND;
    atname (1) := 'NOTHING';
    OPEN c1 (powner, ptable, plevel);
    LOOP
    bprocessed := FALSE;
    FETCH c1
    INTO vlevel, vtname;
    IF nindex > 1 AND atname (atname.LAST - 1) = vtname
    THEN
    --DBMS_OUTPUT.PUT_LINE('2 ==== vtname  ' ||vtname || '   '|| atname.count|| '   '||atname.last ||  '   '||atname( atname.last-1));
    bprocessed := TRUE;
    END IF;
    IF NOT bprocessed
    THEN
    nindex := nindex + 1;
    atname.EXTEND;
    atname (nindex) := vtname;
    PIPE ROW (vlevel || ' => ' || vtname);
    DBMS_OUTPUT.put_line ( ' **** nindex - atname( nindex) '
    || nindex
    || ' - '
    || atname (nindex)
    DLOG('ADDING ',vTname); A LOGGING ATONOMUS PROCEDURE FOR DEBUG PURPOSE
    END IF;
    EXIT WHEN c1%NOTFOUND;
    END LOOP;
    CLOSE c1;
    FOR i IN 1 .. atname.COUNT
    LOOP
    DBMS_OUTPUT.PUT_LINE('atname (i) ' ||atname (i));
    END LOOP;
    RETURN;
    EXCEPTION
    WHEN no_data_needed
    THEN -- THIS EXCEPTION HAS TO BE THERE TO GET THE FUCTION WORKABLE
    DBMS_OUTPUT.put_line (SQLERRM);
    RETURN;
    END get_child_tables;
    /

  • Insert data Flatfile table to Parent and child tables

    Hi All,
        I have Flatfile table which is we getting from daily txt files and i want to populate flatfile data to parent as well as child tables. parent table has primary key as ID. This ID is foreign key of child tables. 
    Here i have mentioned our process.
    1. Flatfile duplicates has to remove with condition of daily date.
    2. Before Insert parent table have to check duplicate(we have Unique key of 4 columns in parent) if duplicate is there we have to delete duplicate then Insert into parent table unique records(Primary key is ID).(here why we are delete duplicate record meaning
    we getting daily files so if any records updated in future that record should be insert to parent and child table so only we delete old records and insert new records).
    3.After insert parent we have to populate child tables from Flatfile table as well as we have to insert parent table primary key as foreign key of child tables.
    4. if any truncation error occurs that errors should go to error log table.
    Right now we are using cursor for this concept and cursor has performance issue. so we are trying to optimize other way to populate parent and child table to increase performance to populate.
    Please help us to which way to do this process increase of performance .
    Please  can any one reply.

    Hi RajVasu,
    Since this issue is related to Transact-SQL, I will move this thread to Transact-SQL forum. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Sql server partition parent table and reference not partition child table

     
    Hi,
    I have two tables in SQL Server 2008 R2, Parent and Child Table.  
    Parent has date time, and it is partitioned monthly,  there is a Child table which just refer the Parent table using Foreign key relation.   
    is there any problem the non-partitioned child table referring to a partitioned parent table?
    Thanks,
    Areef

    The tables will need to be offline for the operation. "Offline" here, means that you wrap the entire operation in a transaction. Ideally, this transaction would:
    1) Drop the foreign key.
    2) Use ALTER TABLE SWITCH to drop the old data.
    3) Use ALTER PARTITION FUNCTION to drop the old empty partition.
    4) Use ALTER PARTITION FUNCTION to add a new empty partition.
    5) Reapply the foreign keys WITH CHECK.
    All but the last operation are metadata-only operation (provided that you do them right). To perform the last operation, SQL Server must scan the child tbale and verify that all keys are present in the parent table. This can take some time for larger tables.
    During the transaction, SQL Server holds Sch-M locks on the table, which means that are entirely inaccessible, even for queries running with NOLOCK.
    You avoid this the scan by applying the fkey constraint WITH NOCHECK, but this can have impact on query plans, as SQL Server will not consider the constraint as trusted.
    An alternative which should not be entirely dismissed is to use partitioned
    views instead. With partitioned views, the foreign keys are not an issue, because each partition is a pair of tables, with its own local fkey.
    As for the second question: it appears to be completely pointless to partition the parent, but not the child table. Or does the child table only have rows for a smaller set of the rows in the parent?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to find  out child tables given a parent table /parent's constraint_nam

    Hi
    I need to disable a primary key but is not able to becoz of referential constraint
    select child_constraint.table_name, child_constraint.constraint_name, child_detail.column_name
    from user_cons_columns child_detail
    join user_constraints child_constraint
    on child_detail.constraint_name = child_detail.constraint_name
    and child_detail.owner = child_detail.owner
    and child_detail.table_name= child_detail.table_name
    where child_constraint.constraint_type='R'
    and child_constraint.status='ENABLED'
    and child_constraint.r_constraint_name='SUBSCRIBER_PK';
    and child_detail.table_name='ADDRESS_BOOK_GROUP';
    Given a table name how would I know all the child tables and the child tables' columns referencing the parent keys?
    thanks

    thanks for the reply
    while the first query is correct
    select child_constraints.table_name child_table_name, child_detail.constraint_name child_constraint_name
    , child_detail.column_name child_column_name, child_constraints.constraint_type child_constraint_type
    , child_constraints.status, parent_constraints.table_name parent_table_name, parent_detail.column_name parent_column_name
    , parent_constraints.constraint_name parent_constraint_name
    , parent_constraints.status parent_constraint_status from
    user_cons_columns child_detail
    join user_constraints child_constraints
    on child_detail.constraint_name=child_constraints.constraint_name
    and child_detail.owner=child_constraints.owner
    and child_detail.table_name=child_constraints.table_name
    join user_constraints parent_constraints
    on parent_constraints.constraint_name=child_constraints.r_constraint_name
    join user_cons_columns parent_detail
    on parent_detail.constraint_name=parent_constraints.constraint_name
    and parent_detail.owner=parent_constraints.owner
    and parent_detail.table_name=parent_constraints.table_name
    where
    child_constraints.r_constraint_name in (
    select constraint_name from user_constraints parent_constraint
    where parent_constraint.constraint_type='P'
    and parent_constraint.status='ENABLED'
    and parent_constraint.table_name='SUBSCRIBER'
    and child_constraints.constraint_type='R'
    and parent_constraints.constraint_type='P'
    --and child_constraints.status='ENABLED'
    order by child_constraints.table_name
    , child_detail.position
    the second query return a lots of garbage why is this so?
    select child_constraints.table_name child_table_name, child_detail.constraint_name child_constraint_name
    , child_detail.column_name child_column_name, child_constraints.constraint_type child_constraint_type
    , child_constraints.status, parent_constraints.table_name parent_table_name, parent_detail.column_name parent_column_name
    , parent_constraints.constraint_name parent_constraint_name
    , parent_constraints.status parent_constraint_status from
    user_cons_columns child_detail
    join user_constraints child_constraints
    on child_detail.constraint_name=child_constraints.constraint_name
    and child_detail.owner=child_constraints.owner
    and child_detail.table_name=child_constraints.table_name
    join user_constraints parent_constraints
    on parent_constraints.constraint_name=child_constraints.r_constraint_name
    join user_cons_columns parent_detail
    on parent_detail.constraint_name=parent_constraints.constraint_name
    and parent_detail.owner=parent_constraints.owner
    and parent_detail.table_name=parent_constraints.table_name
    where
    child_constraints.constraint_type='R'
    and parent_constraints.constraint_type='P'
    --and child_constraints.status='ENABLED'
    order by child_constraints.table_name
    , child_detail.position
    thanks

  • Perfomance Issue on Parent Child table SQL

    I am having table a and child table b contains data and message .
    both are linked with id column. how can i pick the latest message from b against id . how can we make fastest sql.
    I tried with subquries but it is taking time and working slow.
    When i checking the cost of the sql in plan it is showing more than which i am expecting
    Edited by: SA123 on Jun 22, 2009 3:22 PM

    Old Structure output
    PLAN_TABLE_OUTPUT                                   
    | 0 | SELECT STATEMENT | | 194 | 149K|                                   
    591 (7)| 00:00:08 |                                   
    | 1 | SORT ORDER BY | | 194 | 149K|                                   
    591 (7)| 00:00:08 |                                   
    |* 2 | HASH JOIN | | 194 | 149K|                                   
    590 (7)| 00:00:08 |                                   
    |* 3 | HASH JOIN RIGHT OUTER | | 192 | 142K|                                   
    504 (8)| 00:00:07 |                                   
    PLAN_TABLE_OUTPUT                                   
    | 4 | VIEW | | 5 | 2535 |                                   
    288 (4)| 00:00:04 |                                   
    |* 5 | FILTER | | | |                                   
    | |                                   
    | 6 | HASH GROUP BY | | 5 | 570 |                                   
    288 (4)| 00:00:04 |                                   
    |* 7 | HASH JOIN | | 32116 | 3575K|                                   
    PLAN_TABLE_OUTPUT                                   
    283 (2)| 00:00:04 |                                   
    | 8 | TABLE ACCESS FULL | b | 31837 | 373K|                                   
    141 (2)| 00:00:02 |                                   
    | 9 | TABLE ACCESS FULL | b | 31837 | 3171K|                                   
    141 (2)| 00:00:02 |                                   
    | 10 | NESTED LOOPS | | 192 | 48768 |                                   
    216 (13)| 00:00:03 |          
    New Structure
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 196 | 152K|
    | 1108 (4)| 00:00:14 |
    | 1 | SORT ORDER BY | | 196 | 152K|
    | 1108 (4)| 00:00:14 |
    |* 2 | HASH JOIN | | 196 | 152K|
    | 1107 (4)| 00:00:14 |
    |* 3 | HASH JOIN | | 193 | 145K|
    | 1021 (4)| 00:00:13 |
    PLAN_TABLE_OUTPUT
    | 4 | NESTED LOOPS | | 192 | 48192 |
    | 216 (13)| 00:00:03 |
    |* 5 | HASH JOIN | | 3832 | 419K|
    | 206 (11)| 00:00:03 |

  • Tbale Data Not picked from Child Table while configuring Database Adapter

    Hi,
    we are experiencing problem while picking multiple records from child table while polling from the database.
    details are, lets say we have one Parent table "Student (Id ,College) and one Child Table (Id,Book,Author)
    Id is Primary key in Student Table and Foregin in Child Table.Lets say data in tables are
    Student Table :196263,"Y.M.C.A"
    Child Table :196263,"English","Gill"
    196263 ,"Maths","Nagpal"
    Now what should be done while polling 1 record should be picked from student table and 2 diferent records from Child Table ..for the above given scenario...
    (I have used 1:M Relationship).
    But What is happening that from Child Table only first record got picked up 2 times..and record from Student Tablle was being picked correctly.....but in the ideal
    Cab anybody help me how to resolve this issues....

    Hi Gurus,
    I am facing similar kind of issue i.e. after polling on header table (Logical Delete), the header records are updated correctly.
    But the problem starts in child table. From Child Table only first record is getting picked up 2 times (if 2 rows are there for that particular header id).
    Kindly help.
    Thanks,
    Abhishek
    Edited by: Abhishek saurabh on Jul 31, 2009 1:09 AM
    Edited by: Abhishek saurabh on Jul 31, 2009 1:11 AM

Maybe you are looking for